import math

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

  for i in range(2,int(math.sqrt(MAX_INT)+1)):
    if type(primes[i])==bool and primes[i] == True:
      # multiple of i
      j = 2
      while i*j < MAX_INT:
        if type(primes[i*j]) == bool:
          primes[i*j] = i
        j += 1

  return primes

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

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