

def gcd(a, b):
    if a == b: return a
    while b > 0: a, b = b, a % b
    return a

def lcm(a, b):
    return abs((a // gcd(a, b)) * b)

from functools import reduce

n=int(input())
ar=[int(i) for i in input().strip().split(" ")]
l=ar[0]
t=1
for i in range(1,n):
    if gcd(l,ar[i])!=1:
        t=-1
        break
    else:
        l=lcm(l,ar[i])
if t==1:
    print("pairwise coprime")
else:
    k=reduce(gcd,ar)
    if k==1:
        print("setwise coprime")
    else:
        print("not coprime")
