import math
from functools import reduce

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

check1 = False
check2 = True

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
  
def prime_decomposition(x):
  i = 2
  ls = []
  while i * i <= x:
    while x % i == 0:
      x /= i
      ls.append(i)
    i += 1
  if x > 1:
    ls.append(x)
  return ls
  

if gcd_list(A) == 1:
  check1 = True
  
A.sort()
for i in set(prime_decomposition(A[0])):
  for j in A[1:]:
    if j % i == 0:
      check2 = False
      break
  if not check2:
    break
    
if check1 and check2:
  print("pairwise coprime")
elif check1:
  print("setwise coprime")
else:
  print("not coprime")