n=int(input())
p=list(map(int,input().split()))
List=[0 for _ in range(max(p)+1)]

def L(N):
    i=1
    while i*i<=N:
        if N%i==0:
            List[i]+=1
            if i!=N//i:
                List[N//i]+=1
        i+=1
for i in range(n):
    L(p[i])

List=List[2:]
ans='pairwise coprime'
for i in range(int(len(List)**0.5)+1):
    if List[i]==n:
        ans='not coprime'
        break
    if List[i]>1:
        ans='setwise coprime'       
print(ans)