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 <= M:
#         cnt += (ni in A)
#         ni += i
#     isPairwise &= (cnt <= 1)
M = 10 ** 6
sieve = [0] * (M + 1)
for a in A:
    sieve[a] = 1

cnt = 0
for i in range(2, M + 1):
    cnt = max(cnt, sum(sieve[j] == 1 for j in range(i, M + 1, i)))
isPairwise = (cnt <= 1)

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