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