import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = list(map(int, input().split()))

pc_flag = True
for i in range(n):
  for j in range(n):
    if (j >= i):
      continue
    ans = gcd(a[i], a[j])
    if (ans != 1):
      pc_flag = False
      

if (pc_flag):
  print("pairwise coprime")
  exit()

if (gcd_list(a) == 1):
  print("setwise coprime")
else:
  print("not coprime")