# E - Coprime
from math import gcd

N = int(input())
A = list(map(int,input().split()))
A = sorted(A)
L = [None]*(10**6+1)
L[1] = set()

def prime(x):
    global L
    if L[x]!=None:
        return L[x]
    p = 2
    while True:
        if x%p==0:
            s = prime(x//p)|set([p])
            L[x] = s
            return L[x]
        p = p+1 if p*p<=x else x
        
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 G==1:
        break

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