from math import sqrt
from fractions import gcd
N = int(input())
A = list(map(int, input().split()))
M = 10 ** 6
num = [i+1 for i in range(M)]
num[0] = 0
for i in range(1, M):
  if num[i] == i + 1:
    if i + 1 > sqrt(M):
      break
    n = 2 * (i + 1)
    while n <= M:
      num[n-1] = min(num[n-1], i + 1)
      n += (i + 1)
primes = [p+1 for p in range(M) if num[p] == p+1]
l = len(primes)
B = [0 for i in range(l)]
t = 0
for i in range(N):
  j = num[A[i]-1]
  a = A[i]
  while a > 1:
    if a % j == 0:
      B[j] += 1
      if B[j] >= 2:
        t = 1
    while a % j == 0:
      a //= j
    j += 1
if t == 0:
  print("pairwise coprime")
else:
  p = A[0]
  for i in range(1, N):
    p = gcd(p, A[i])
  if p == 1:
    print("setwise coprime")
  else:
    print("not coprime")