from math import gcd

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

a.sort()
xs = [0] * (a[-1] + 1)
g = a[0]
for v in a:
    g = gcd(g, v)
    xs[v] += 1

if g != 1:
    print("not coprime")
    exit()

for v in a:
    j = 2
    while v * j <= a[-1]:
        if xs[v * j] > 0:
            print("setwise coprime")
            exit()
        xs[v * j] += 1
print("pairwise coprime")
