def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

def factorization(n):
    arr = []
    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.append(i)

    if temp!=1:
        arr.append(temp)

    return arr

N=int(input())
A=list(map(int, input().split()))
p=1
A=sorted(A)
num1=A.count(1)
B=list(set(A))
if len(B)<len(A)-num1+1:
    p=0
S=set(factorization(B[0]))
T=set(factorization(B[0]))
flg=0
for i in range(1,len(B)):
    prime=set(factorization(B[i])
    if T&prime!=set():
        flg=1
    S=S&prime
    T=T|prime    #print(S,T)
if S!=1:
    print('not coprime')
elif flg==1 or p=0:
    print('setwise coprime')
else:
    print('pairwise coprime')
