from fractions import gcd

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

lst = [0]*(max(As)+1)

for a in As:
  i = 2
  if a % i == 0:
    lst[i] += 1
  while a % i == 0:
    a //= i
  i = 3
  while i**2 <= N:
    if a % i == 0:
      lst[i] += 1  
    while a % i == 0:
      a //= i
    i += 2
  if a > 1:
    lst[a] += 1
    
if max(lst) < 2:
  print('pairwise coprime')
  exit()
  
t = As[0]

for a in As:
  t = gcd(t,a)
  
if t == 1:
  print('setwise coprime')
else:
  print('not coprime')
