from math import gcd
n = int(input())
a = list(map(int, input().split()))
g = 0
for i in range(n):
    g = gcd(g, a[i])
cur = a[0]
f = False
for i in range(1, n):
    if gcd(cur, a[i]) != 1:
        f = True
        break
    cur *= a[i] // gcd(cur, a[i])
if not f:
    print("pairwise coprime")
elif g == 1:
    print("setwise coprime")
else:
    print("not coprime")