import math
N = int(input())
A = sorted(list(map(int,input().split())))
d = [0]*(10**6+2)
d[1] = 1

def yakusuu(M):
    P = [M]
    for k in range(2,math.floor(math.sqrt(M))+1):
        if M % k == 0:
            P.append(k)
            P.append(M//k)
    return sorted(list(set(P)))

for e in A:
    for y in yakusuu(e):
        d[y] += 1


if max(d) == 1:
    print("pairwise coprime")
    exit(0)

t = A[0]
for e in A:
    t = math.gcd(e,t)

if t == 1:
    print("setwise coprime")
else:
    print("not coprime")
