import numpy as np

def getD(num):
    input_list = [2 if i % 2 == 0 else i for i in range(num+1)]
    bool_list = [False if i % 2 == 0 else True for i in range(num+1)]
    sqrt = np.sqrt(num)

    for serial in range(3, num, 2):
    
        if serial >= sqrt:
            return input_list

        for s in range(serial ** 2, num, serial):
            if bool_list[s]:
                input_list[s] = serial
                bool_list[s] = False

N = int(input())
A = list(map(int, input().split()))

D = getD(max(A))
record = np.zeros((N, max(A)+1), np.uint8)

for i, a in enumerate(A):
    while a > 1:
        record[i, D[a]] = 1
        a = a // D[a]

flag = True

for i in range(2, max(A) + 1):
    s = np.sum(record[:, i])
    if s == 1:
        continue
    elif s == N:
        print('not coprime')
        exit()
    if s > 1:
        flag = False

if flag:
    print('pairwise coprime')
else:
    print('setwise coprime')

