from math import gcd
INF = float('inf')
N = int(input())
A = list(map(int,input().split()))
flg = True
lis = [INF] * (10**6+5)
for i in range(2,int((10**6)**0.5)+1):
    if lis[i] == INF:
        for j in range(i*2,10**6+1,i):
            lis[j] = i
st = set()
for i in range(N):
    p = A[i]
    d  =[]
    while lis[p] != INF:
        d.append(lis[p])
        p //= lis[p]
    #if p > 1:
    d.append(p)
    for i in range(len(d)):
        if d[i] in st:
            flg = False
    for i in range(len(d)):
        st.add(d[i]) 
#print(lis[:15])

if flg == True:
    print('pairwise coprime')
    exit()



val = A[0]
for i in range(1,N):
    val = gcd(val,A[i])
if val == 1:
    print('setwise coprime')
    exit()
print('not coprime')