import math
from collections import defaultdict

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

S=[1]*1000001
for i in range(2,1000001):
    if S[i]==1:
        for j in range(i,1000001,i):
            if S[j]==1:
                S[j]=i

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

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

if isPairwise:
    z = 'pairwise coprime'
elif isSetwise:
    z = 'setwise coprime'
else:
    z = 'not coprime'
print(z)
