import math

n = int(input())
a_list = list(map(int, input().split()))

a_max = (10**6)+1
hist = [0] * a_max
for a in a_list:
    hist[a] += 1

pairwise = True
for i in range(2, a_max, 1):
    count = 0
    for j in range(2, a_max, i):
        count += hist[j]

    if count > 1:
        pairwise = False

if pairwise:
    print('pairwise coprime')
else:
    setwise = True
    g = a_list[0]
    for a in a_list:
        g = math.gcd(g, a)
    if g > 1:
        setwise = False

    if setwise:
        print('setwise coprime')
    else:
        print('not coprime')
