import math
f=0
n=int(input())
a=list(map(int,input().split()))
_gcd=math.gcd(a[0],a[1])
for i in range(2,len(a)):
    _gcd=math.gcd(_gcd,a[i])
if _gcd==1:
    print("setwise coprime")
else:
    p=[0]*10**6
    for i in range(0,len(a)):
        for j in range(2,int(math.sqrt(a[i]))+1):
            if a[i]%j==0:
                p[i]+=1
        if max(p)>1:
            f=1
            break  
    if f==1:
        print("not coprime")
    else:
        print("pairwise coprime")