import math

n = input()
As = list(map(int, input().split()))
gcd = As[0]
for a in As[1:]:
    tmp = gcd
    gcd = math.gcd(tmp, a)

if gcd > 1:
    print("not coprime")
    exit()

era = [0] * (10**6 + 1)
for a in As:
    era[a] += 1
for d in range(2, 10**6+1):
    data = [i for i in range(d,10**6+1,d)]
    cnt = 0
    for i in data:
        cnt += era[i] 
    if cnt > 1:
        print("setwise coprime")
        exit()
print("pairwise coprime")

    