import math
N = int(input())
A = list(map(int, input().split()))
a = A[0]
s = 0
t = 0
for i in range(1,N):
    a = math.gcd(A[i],a)
    b = math.gcd(A[i-1],A[i])
    if b > 1:
        t = 1
if a > 1:
    print("not coprime")
elif t == 1:
    print("setwise coprime")
else:
    print("pairwise coprime")