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

d = {}
flag = False
for i in a:
    f = sympy.factorint(i)
    for k in f.keys():
        try:
            if d[k] >= 1:
                d[k] += 1
                flag = True
        except:
            d[k] = 1
if not flag:
    print("pairwise coprime")
else:
    flag = False
    for i in d.values():
        if i == len(a):
            print("not coprime")
            flag = True
            break
    if not flag:
        print("setwise coprime")
