from math import gcd


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

# setwise validation
tmp = 0
for a in A:
    tmp = gcd(tmp, a)
isSetwise = (tmp == 1)


# pairwise validation
M = 10 ** 6
A = set(A)
isPairwise = True
for i in range(2, M):
    cnt = 0
    ni = 0
    while (ni := ni + i) <= M:
        cnt += (ni in A)
    isPairwise &= (cnt <= 1)

# check
if isPairwise:
    ans = 'pairwise coprime'
elif isSetwise:
    ans = 'setwise coprime'
else:
    ans = 'not coprime'
print(ans)
