import math
from functools import reduce

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

cut = [0 for _ in range(MAX+1)]
for i in range(2, MAX+1):
    if cut[i] != 0:
        continue
    for j in range(i, MAX+1, i):
        cut[j] = i

if reduce(math.gcd, A) != 1:
    print('not coprime')
    exit()

already = set()
for a in A:
    now = set()
    while a != 1:
        if cut[a] in already:
            print('setwise coprime')
            exit()
        a //= cut[a]
        now.add(cut[a])
    already |= now

print('pairwise coprime')