from math import gcd
n = int(input())
a = list(map(int, input().split()))
u = 0
for i in a:
    u = gcd(u, i)
if u != 1:
    print('not coprime')
    exit()
vis = [False] * (10 ** 6 + 1)
for i in a:
    vis[i] = True
cnt = [0] * (10 ** 6 + 1)
for i in range(1, 10 ** 6 + 1):
    for j in range(1, 10 ** 6 + 1):
        if i * j > 10 ** 6:
            break
        if vis[i * j]:
            cnt[i] += 1
if max(cnt[2:]) <= 1:
    print('pairwise coprime')
else:
    print('setwise coprime')