gcd=lambda x,y:gcd(y,x%y) if y!=0 else x
def f(a):
    p=a[0]
    for i in range(1,len(a)):
        p=gcd(p,a[i])
    if p==1:
        print("setwise coprime")
    else:
        print("not coprime")

n=int(input())
a=list(map(int,input().split()))
if 1 in a:
    print("not coprime")
l=[0 for i in range(2*10**6)]
for i in a:
    l[i]+=1
for i in range(2,2*10**6):
    p=0
    for j in range(i*i,2*10**6,i):
        p+=l[j]
    if p>1:
        f(a)
        exit()
print("pairwise coprime")