def gcd(a, b):
    return gcd(b, a%b) if a%b else b

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

numlist = [0] * (max(a) + 5)
g = 0
for i in range(n):
    numlist[a[i]] += 1
    g = gcd(g, a[i])

pairwise = True
for i in range(2, 1000005):
    ctr = 0
    for j in range(i, max(a), i):
        ctr += numlist[j]
    if ctr > 1:
        pairwise = False

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