#E
from math import gcd
N=int(input())
A=list(map(int,input().split()))

pc = "pairwise coprime"
sc = "setwise coprime"
nc = "not coprime"

from math import ceil,floor
sumi=set()
ans=pc
maxi=10**6
flag=True

for num in A:
    if num not in sumi:
        p = floor(maxi/num)+1
        for i in range(1,p):
            tmp=i*num
            if tmp in sumi:
                flag=False
                break
            else:
                sumi.add(tmp)
            #print(num,i*num)
    else:
        flag=False
    #print(num,sumi)

if flag:
    ans=pc
else:
    tmp2=A[0]
    for q in range(1,N):
        tmp2 = gcd(tmp2,A[q])
    if tmp2==1:
        ans=sc
    else:
        ans=nc

print(ans)