N=int(input())
A=list(map(int,input().split()))
import numpy as np
X=np.zeros(A[N-1]+1)
import math
import sys
count=0
for i in range(int(math.sqrt(A[N-1]))+1):
    if i>=2:
        X[i::i]=1
    sumx=sum(X[A[j]] for j in range(N))
    if sumx==N:
        print('not coprime')
        sys.exit()
    elif sumx>=2:
        print('setwise coprime')
        sys.exit()
print('pairwise coprime')