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

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

n = int(input())
x = list(map(int,input().split()))
mod = int(1e9 + 7)

prod = x[0]
lc = x[0]
gc = x[0]

for i in range(1, len(x)):
    prod *= x[i]
    lc = lcm(lc, x[i])
    gc = gcd(gc, x[i])

if gc > 1: print ("not coprime")
elif lc == prod: print ("pairwise coprime")
else: print("setwise coprime")

