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

import math 

ans = a[0]
for i in range(1, n):
    ans = math .gcd(ans, a[i])

if ans!=1:
    #print(ans)
    print("not coprime")
    exit()
else:
    checked=[0]*(int(max(a)**(0.5))+100)

    for item in a:

        for j in range(2,int(item**0.5)+1):
            if item%j==0 and j*j<=item:
                if checked[j]==0:
                    checked[j]+=1
                else:
                    #print(item,j,checked)
                    print("setwise coprime")
                    exit()
print("pairwise coprime")



