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


A=sorted(A)
gcda=A[0]
gcdais=True
gcdb=A[0]
MAX=max(A)
counts=[0]*MAX
counts[A[0]-1]+=1
for i in range(1,N):
    
    a=A[i]
    gcdb=gcd(gcdb, a)
    counts[a-1]+=1

for i in range(1,MAX):
    count=0
    now=i+1
    while now<=MAX:
        if counts[now-1]!=0:
            count+=counts[now-1]
        now+=(i+1)
    if count>=2:
        gcdais=False
    #print(count)
    
#print(counts)
if gcdais:
    print("pairwise coprime")
elif gcdb==1:
    print("setwise coprime")
else:
    print("not coprime")
