def egcd(a, b):
    if a == 0:
        return b
    else:
        g= egcd(b % a, a)
        return g

N=int(input())
A=list(map(int, input().split()))
n=N//2
m=((N//2)-(N+1)%2)
L1=[0]*n
L2=[0]*m

for i in range(n):
    L1[i]=egcd(A[2*i],A[2*i+1])
for j in range(m):
    L2[j]=egcd(A[2*j+1],A[2*j+2])
# print(L1)
# print(L2)

if all(L1[i]==1 for i in range(n)) and all(L2[j]==1 for j in range(m)):
    print('pairwise coprime')
    exit()

if N%2==1:
    L1.append(A[-1])
while len(L1)>1:
    l=len(L1)//2
    tmp=[0]*l
    for i in range(l):
        tmp[i]=egcd(L1[2*i],L1[2*i+1])
    if len(L1)%2==1:
        tmp.append(L1[-1])
    L1=tmp

if L1[0]==1:
    print('setwise coprime')
else:
    print('not coprime')