import numpy as np
from math import gcd
from functools import reduce

PC = True
SC = True

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


for i in range(N):
  for j in range(N-1, i, -1):
    if A[i] < np.sqrt(A[j]):
      break
    if gcd(A[i],A[j]) != 1:
      PC = False
      break
        
p = reduce(gcd, A)
if p != 1:
  SC = False
      
if PC == True:
  print('pairwise coprime')
else:
  if SC == True:
    print('setwise coprime')
  else:
    print('not coprime')