prime=[[] for _ in range(1000000+1)]

for i in range(2,1000000+1):
    if prime[i]==[]:
        for j in range(i,1000000+1,i):
            prime[j].append(i)
n=eval(input())
lis=[]
trs=list(map(int,input().split()))
for m in trs:
    lis.append(prime[m])
check=[]
flag=True
for i in range(n):
    for _ in lis[i]:
        if _ in check:
            flag=False
            break
        else:
            check.append(_)
tmp=[]
if flag==False:
    for _ in trs:
        if check!=[]:
            tmp=[]
            for i in check:
                if _%i==0:
                    tmp.append(i)
            check=tmp
    if check==[]:
        print("setwise coprime")
    else:
        print('not coprime')
else:
    print('pairwise coprime')

