# E - Coprime
from math import gcd

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

def prime(x):
    s = set()
    p = 2
    while x>1:
        if x%p==0:
            s.add(p)
            while x%p==0:
                x //= p
        p += 1
    return s

G = A[0]
pairwise = True
s = prime(A[0])

for i in range(1,N):
    a = A[i]
    t = prime(a)
    if len(s&t)>0:
        pairwise = False
    s = s|t
    G = gcd(G,a)

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