from math import gcd
from itertools import zip_longest

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

npcf = False
while True:
    B = []
    for x, y in zip_longest(A[:len(A)//2], A[len(A)//2:], fillvalue=1):
        if gcd(x, y) != 1:
            npcf = True
            break
        B.append(x*y)
    if npcf:
        break
    if len(B) == 1:
        break
    A = B

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

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