import sys
N=int(input())
A=list(map(int,input().split()))
maxA=max(A)

X=[0]*(maxA+1)
for i in range(N):
    X[A[i]]+=1

check=0    
for i in range(2,maxA+1):
    count=0
    for j in range(1,int(maxA/i)+1):
        count+=X[j*i]
    if count==N:
        print('not coprime')
        sys.exit()
    elif count>1:
        check=1
        
if check==1:
    print('setwise coprime')
else:
    print('pairwise coprime')