import sys, math

N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))

ok = True
tmp = A[0]
for a in A[1:]:
    tmp = math.gcd(a, tmp)
    if tmp != 1:
        ok = False

if tmp != 1:
    print("not coprime")
else:
    if ok:
        print("pairwise coprime")
    else:
        print("setwise coprime")
