from math import gcd

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

num = 10 ** 6
is_prime = [0] * (num + 1)
is_prime[0] = 1
is_prime[1] = 1

for i in range(2, num + 1):
    if is_prime[i] != 0:
        continue

    cnt = 2
    while i * cnt <= num:
        is_prime[i * cnt] += 1
        cnt += 1


pairwise = True
for a in A:
    if is_prime[a] > 1:
        pairwise = False
        break

g = A[0]
for a in A[1:]:
    g = gcd(g, a)

if pairwise:
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')

