import math

def sieve():
  n = 10**6
  primes = [set() for _ in range(n+1) ]

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

  return primes

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

dic = {}
flg = True
for a in A:
  if len(primes[a])==0:
    facs = [a]
  else:
    facs = primes[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")

