def gcd(a,b):
    while b:
        a,b=b,a%b
    return a
      

N=int(input())
A=list(map(int,input().split()))
left=[0]*N
right=[0]*N
for i in range(1,N):
    left[i]=gcd(left[i-1],A[i-1])
    right[N-1-i]=gcd(right[N-i],A[N-i])
#pairwiseについて
ans=1
for i,j in zip(left,right):
    ans=max(ans,gcd(i,j))
#sewtwiseについて
a=A[0]
for i in range(1,N):
    a=gcd(a,A[i])

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