import math
from collections import defaultdict

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

S=[0]*(max(A)+1)
E=int(math.sqrt(N))
S[1]=1
for i in range(2,max(A)+1):
    if S[i]==0:
        for j in range(i,max(A)+1,i):
            if S[j]==0:
                S[j]=i

p=True
s=defaultdict(lambda:False)
for i in range(0,N):
#    print(A[i],S[A[i]])
    if s[S[A[i]]]==True:
        p=False
        break
    s[S[A[i]]]=True

gcd=A[0]
for i in range(1,N):
    gcd=math.gcd(gcd, A[i])

if p:
    print('pairwise coprime')
else:
    if gcd==1:
        print('setwise coprime')
    else:
        print('not coprime')
#print(S)
