mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
a.sort()
g=a[0]
d=defaultdict(int)
for i in a:
    g=math.gcd(g,i)
    d[i]+=1
if g>1:
    print("not coprime")
p=[0]*(a[-1]+1)
ch=0
for i in range (2,a[-1]+1):
    if p[i]==1:
        continue
    p[i]=1
    ans=0
    for j in range (i,a[-1]+1,i):
        ans+=d[j]
    if ans>1:
        ch=1
        break
if ch==1:
    print("setwise coprime")
else:
    print("pairwise coprime")