import math

def sieve():
  n = 10**6+1
  primes = [True]*(n+1)
  primes[0],primes[1] = False,False

  for i in range(2,int(math.sqrt(n)+1)):
    if primes[i] == True:
      j = 2
      while i*j <= n:
        primes[i*j] = False
        j += 1

  return primes

def prime_factors(n):
  i = 2
  factors = set()
  while i * i <= n:
    if n % i:
      i += 1
    else:
      n //= i
      factors.add(i)

  if n > 1:
    factors.add(n)
  return factors

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

dic = {}
flg = True
for a in A:
  if primes[a]:
    facs = [a]
  else:
    facs = prime_factors(a)

  for p in facs:
    if p in dic:
      flg = False
      break
    else:
      dic[p] = 1

if flg:
  print("pairwise coprime")
else:
  g = A[0]
  for i in range(1, N):
    g = math.gcd(g, A[i])
  if g == 1:
    print("setwise coprime")
  else:
    print("not coprime")

