from collections import defaultdict

def f(n):
    yakusu = []
    tmp = (n ** 0.5) + 1
    for i in range(2, n):
        if tmp <= i:
            yakusu.append(n)
            break
        if n % i == 0:
            yakusu.append(i)
            break
    for i in yakusu:
        if i != 1:
            d[i] += 1

d = defaultdict(int)
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
    f(A[i])

cnt = 1
for i, v in d.items():
    if v != 1:
        cnt = max(cnt, v)

if cnt == N:
    print('not coprime')
elif cnt == 1:
    print('pairwise coprime')
else:
    print('setwise coprime')
