import math

def sieve_of_erastosthenes(num):
    print(num)
    input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num+1)]
    input_list[0] = input_list[1] = False
    input_list[2] = input_list[3] = input_list[5] = True
    sqrt = math.sqrt(num)

    for serial in range(3, num, 2):

        if serial >= sqrt:
            return input_list

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

N = int(input())
A = [int(i) for i in input().split()]
ans = math.gcd(A[0], A[1])
tmp = math.gcd(A[0], A[1])
for i in range(2, N):
    ans = math.gcd(ans, A[i])
if ans > 1:
    print('not coprime')
    exit()
maxA = max(A)
l = sieve_of_erastosthenes(maxA)
B = [False for i in range(maxA+1)]
for i in range(N):
    B[A[i]] = True
flag = False
for i in range(len(l)):
    # 素数の時
    if l[i]:
        tmp = i
        counter = 0
        while True:

            if B[tmp]:
                counter += 1
            tmp += i
            if tmp > maxA:
                break
        if counter > 1:
            flag = True
            break


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