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

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

def fac(n):
    arr = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.add(i)
            arr.add(cnt)
    if temp!=1:
        arr.add(temp)
        arr.add(1)
    if arr==set():
        arr.add(n)
        arr.add(1)
    return arr
###############################################################
ans=pc
st = set()

for num in A:
    tmp = fac(num)
    #print(num,tmp)
    for p in tmp:
        if p!=1:
            if p in st:
                ans = sc
                break
            else:
                st.add(p)
if ans==pc:
    pass
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)