import math

def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd

def prime_fact(N):
  M = N
  primes = []
  K = 2

  while K*K <= M:
    while N%K == 0:
      primes.append(K)
      N = N//K
    K += 1
  
  if N != 1:
    primes.append(N)

  return primes

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

if gcd_list(A) != 1:
  print("not coprime")
  
else:
  primes = set(prime_fact(A[0]))
  ans = "pairwise coprime"
  for i in range(1,N):
    for j in list(primes):
      if A[i]%j == 0:
        ans = "setwise coprime"
        break
        break
  print(ans)