import math
from math import gcd
from functools import reduce

N = int(input())
num_lis = list(map(int, input().split()))
c1 = True
c2 = True

d_lis = [i for i in range(max(num_lis)+2)]
p = 2
while p**2 <= max(num_lis):
  if d_lis[p] == p:
    for q in range(2*p, max(num_lis)+1, p):
      if d_lis[q] == q:
        d_lis[q] = p
  p += 1

tmp = []
for i in num_lis:
  num = i
  new_tmp = []
  while num > 1:
    d = d_lis[num]
    new_tmp.append(d)
    num //= d
  #print(new_tmp)
  for j in new_tmp:
    if j in tmp:
      c1 = False
      break
    else:
      tmp.append(j)
  if not c1:
    break

g = 0
for i in num_lis:
  g = gcd(g, i)
if g > 1:
  c2 = False

if c1:
  print("pairwise coprime")
elif not c1 and c2:
  print("setwise coprime")
else:
  print("not coprime")