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

def get_primenumber(N):
    prime_list = [2]
    for num in range(3,N+1,2):
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)
    return prime_list

sosu=get_primenumber(1000)

flag=False
for i in sosu:
    cnt=0
    for a in A:
        if a%i ==0:
            cnt+=1
    
    if cnt==len(A):
        print("not coprime")
        exit()
        
    if cnt>1:
        flag=True

if flag:
    print("setwise coprime")
else:
    print("pairwise coprime")
