N = int(input())
Alist = list(map(int, input().split()))
import math
import numpy as np
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
if not gcd_list(Alist) == 1:
  print("not coprime")
  exit()
else:
  flag = True
  Alist = np.array(Alist)
  for i in range(N):
    if not flag:
      exit()
    Alist2 = Alist
    Alist2[i] = 0
    if 1 in Alist2/Alist[i]:
      flag = False
      print("setwise coprime")

  if flag:
    print("pairwise coprime")