import numpy as np

def calc_gcd(a,b):
  r = a % b
  while r != 0:
    a, b = b, r
    r = a % b
  return b

PC = True
AC = True
glst = []

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
    gcd = calc_gcd(A[i],A[j])
    glst.append(gcd)
    if gcd != 1:
      PC = False
      if glst.count(gcd) != 1:
        AC = False
        break
      
if PC == True:
  print('pairwaise coprime')
else:
  if AC == True:
    print('setwise coprime')
  else:
    print('not coprime')