from math import gcd

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

buf = A[0]
for a in A[1:]:
    buf = gcd(buf, a)
if buf == 1:
    print('setwise coprime')
    exit()

npcf = False
for i in range(N - 1):
    for j in range(i + 1, N):
        if gcd(A[i], A[j]) != 1:
            npcf = True
            break
    if npcf:
        break

if not npcf:
    print('pairwise coprime')
else:
    print('not coprime')