MAX_A = 10**6 + 1
is_prim = [True] * MAX_A
is_prim[0] = is_prim[1] = False
for i in range(2, MAX_A):
    if not is_prim[i]: continue
    for j in range(i+i, MAX_A, i):
        is_prim[j] = False
prim = [i for i in range(MAX_A) if is_prim[i]]

def solve():
    max_c = 0
    C = [0] * MAX_A
    for a in A:
        for p in prim:
            if p*p > a: break
            if a%p == 0:
                while a%p: a //= p
                C[p] += 1
                max_c = max(max_c, C[p])
    if max_c <= 1: return 'pairwise'
    elif max_c <= n-1: return 'setwise'
    return 'not'

n = int(input())
A = [*map(int, input().split())]
print(solve(), 'coprime')
