import math

N = int(input())
A = list(map(int, input().split()))

flag = 0 # 0をpairwise coprime

for i in range(N): 
    for j in range(i+1, N):
        if math.gcd(A[i], A[j]) != 1:
            flag = 1 #1はpairwise coprimeではない
            break

g = 0
for i in range(N):
    g = math.gcd(g, A[i])

if flag == 0:
    answer = 'pairwise coprime'
elif flag == 1 and g == 1:
    answer = 'setwise coprime'
else:
    answer = 'not coprime'

print(answer)