N = int(input())
Alist = list(map(int, input().split()))
import math
from functools import reduce

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

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

if not gcd_list(Alist) == 1:
  print("not coprime")
  exit()
else:
  flag = True
  for i in range(N):
    for j in range(i+1, N-1+1):
      if flag and (not gcd(Alist[i], Alist[j]) == 1):
        print("setwise coprime")
        flag = False
  if flag:
    print("pairwise coprime")