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

A = sorted(A,reverse = True)
prime = [0] * (10**6+1)
eratos = list(range(2,A[0]+1))
D = [0] * (A[0]+1)
D[1] = 1
i = 0
while len(eratos)>i:
  x = eratos[i]
  for a in eratos[i:]:
    if a%x==0:
      D[a] = x
  eratos = [a for a in eratos if (a==x)or(a%x!=0)]
  i += 1
  
for a in A:
  while a!=1:
    x = D[a]
    while a%x==0:
      a//=x
    prime[x] += 1

if max(prime)==1:
  print('pairwise coprime')
  
elif max(prime)!=N:
  print('setwise coprime')
else:
  print('not coprime')