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()

d = np.zeros(max_a+10)
for a in A:
    d[a] += 1

for i in range(2, max_a+1):
    if sum(d[i::i]) >= 2:
        print('setwise coprime')
        exit()
print('pairwise coprime')