import math
n=int(input())
a=list(map(int,input().split()))
m=max(a)+1
g=a[0]
d=dict()
for i in a:
    g=math.gcd(g,i)
    if i in d:
        d[i]+=1
    else:
        d[i]=1
if g>1:
    print("not coprime")
else:
    p=[0]*(m)
    ch=0
    for i in range (2,m):
        if p[i]==1:
            continue
        p[i]=1
        ans=0
        for j in range (i,m,i):
            ans+=d[j]
        if ans>1:
            ch=1
            break
    if ch==1:
        print("setwise coprime")
    else:
        print("pairwise coprime")