n = int(input())
A = [*map(int, input().split())]
# print(n)
# print(A)

# 素数と個数を求める
def factorize(n):
    res = []
    for i in range(2,n):
        if i*i > n: break
        if n%i: continue
        res += [[i,0]]
        while n%i == 0:
            n //= i
            res[-1][1] += 1
    if n != 1: res += [[n,1]]
    return res

from math import gcd
gcd_all = A[0]
for a in A: gcd_all = gcd(gcd_all, a)
# print(gcd_all)

if gcd_all != 1:
    print('not coprime')
    exit()

PC = [False] * (10**6+1) # [0, 10**6]
max_A = 0
for a in A:
    max_A = max(max_A, a)
    PC[a] = True

# print(PC[:max_A+1])
# for i in range(max_A+1):
#     if PC[i]:
#         print(i, end=' ')
#     else:
#         print('-', end=' ')
# print()

g = A[0]
for a in A:
    pc = factorize(a)
    # print('pc {}'.format(pc))
    for p,c in pc:
        i = a // p + 1
        # print('a {} p {} c {} i {}'.format(a,p,c,i))
        while i*p <= max_A:
            PC[i*p] = False
            i += 1
            # print('i {}'.format(i))

# print(PC[:max_A+1])
# for i in range(max_A+1):
#     if PC[i]:
#         print(i, end=' ')
#     else:
#         print('-', end=' ')
# print()

num_true = 0
for f in PC:
    if f: num_true += 1

# print(num_true)

if num_true == len(A):
    print('pairwise coprime')
else:
    print('setwise coprime')
