import itertools
import numpy as np

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


def iscomprime(a, b):
    s = min(a, b)
    k = max(a, b)
    while s > 1:
        s1 = s
        s = k % s
        k = s1
    return s

iscomp = 0
for t in itertools.combinations(A, 2):
    if iscomprime(t[0], t[1]) == 1:
        iscomp = 1
        print('pairwise coprime')
        break

if iscomp == 0:
    isset = 0
    A_a = np.array(A)
    j = min(A_a)
    while j > 1:
        A_a = A_a % j
        A_a = A_a[A_a > 0]
        if A_a.size == 0:
            print('not coprime')
            break
        else:
            j = min(A_a)
    if j == 1:
        print('setwise coprime')