from math import gcd

N=int(input())
A=list(map(int, input().split()))
A=sorted(A)

ans=[0]*(A[-1]+1)
c=A[-1]

for i in A:
    c=gcd(c,i)
    for j in range(2, i//2):
        if i%j==0:
            ans[j]+=1
    ans[i]+=1   

if max(ans)==1:
    print('pairwise coprime')

elif c==1:
    print('setwise coprime')

else:
    print('not coprime')