def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y,x%y)

n=int(input())
a=list(map(int,input().split()))
b=gcd(a[0],a[1])
res1=True
res2=True
for i in range(n-1):
    c=a[i];d=a[i+1]
    if gcd(c,d)==1:
        continue
    else:
        res1=False
        b=gcd(b,d)

if res1:
    print("pairwise coprime")
elif b==1:
    print("setwise coprime")
else:
    print("not coprime")
