def countprimes(l):
    count=0
    for i in l:
        flag=0
        if(i>1):
            for j in range(2,(i//2)+1):
                if(i%j==0):
                    flag=1
                    break
            if(flag==0):
                count+=1
    return count+2           

l=[int(i) for i in input().split()]
print(l)
sub=[[]]
for i in range(len(l)+1):
    for j in range(i):
        sub.append(l[j:i])
print(sub)     
product=1
for i in sub:
    #product=product*countprimes(i)
    print(countprimes(i),end=" ")

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: