from collections import defaultdict

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

INF = 10**6

def min_primes(n):
  ret = [i for i in range(n+1)]
  for i in range(2, int(n**0.5)+1):
    if ret[i] < i:
      continue
    for j in range(i, n+1, i):
      ret[j] = min(i, ret[j])
  return ret

D = min_primes(INF)
Ps = defaultdict(int)

def fact(x):
  Ps[D[x]] += 1
  pre = x
  x //= D[x]
  while x > 1:
    if D[x] > D[pre]:
      Ps[D[x]] += 1
    pre = x
    x //= D[x]

for a in A:
  fact(a)

cnt = max(Ps.values())

if cnt == N:
  print("not coprime")
elif cnt == 1:
  print("pairwise coprime")
else:
  print("setwise coprime")