import numpy as np

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


def gcd(x, y):
    if x > y:
        x, y = y, x
    while y != 0:
        tmp = x % y
        x = y
        y = tmp
    return x


n = A[0]
for i in range(1, N):
    n = gcd(n, A[i])
if n != 1:
    print('not coprime')
    exit()

pn = [int(max_a**0.5),]
d = np.zeros(int(max_a**0.5)+10)
for i in range(2, int(max_a**0.5)+1):
    if d[i] == 0:
        pn.append(i)
        d[i::i] = 1

A = np.asarray(A)
for i in pn:
    if np.sum(A%i == 0) >= 2:
        print('setwise coprime')
        exit()
print('pairwise coprime')