from math import gcd
N=int(input())
A=[int(i) for i in input().split()]

ans=0
product=int(1)
g=gcd(A[0],A[1])
if g!=1:
    ans=1


for i in range(N):
    if ans==0:
        if product%A[i]==0:
            ans=1
        product*=A[i]
    if g!=1:
        g=gcd(g,A[i])

if ans==0:
    print('pairwise coprime')
elif g==1:
    print('setwise coprime')
else:
    print('not coprime')
