from math import gcd
n=int(input())
A=list(map(int,input().split()))
m=max(A)
l=[0 for _ in range(m)]
fp=True
for a in A:
    l[a-1]+=1
for i in range(2,m):
    cnt=0
    for j in range(i-1,m,i):
        cnt+=l[j]
        if cnt>1:
            fp=False
            break
g=0
fs=False
for a in A:
    g=gcd(g,a)
if g==1:
    fs=True

if fp:
    print("pairwise coprime")
elif fs:
    print("setwise coprime")
else:
    print("not coprime")