import sys
from math import gcd
from functools import reduce

input = sys.stdin.readline


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)

ds = [0] * (10 ** 6 + 1)

ans = "pairwise coprime"
for ai in a:
    for i in range(ai, len(ds), ai):
        if ds[i] != 0:
            ans = ""
            break
        ds[i] += 1
    else:
        continue
    break


if ans == "pairwise coprime":
    pass
elif reduce(gcd, a) == 1:
    ans = "setwise coprime"
else:
    ans = "not coprime"
print(ans)

pass
