import sys
input = sys.stdin.readline

import math
from functools import reduce

count = int(input())

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

def gcd_p(n):
  an = list(map(int, input().split()))
  num = 1
  for i in range(n - 1):
    for j in range(i+1, n):
      if math.gcd(an[i], an[j]) != 1:
        num *= 0
  if num == 1:
    print("pairwise coprime")
  else:
    if gcd_s(an) == 1:
      print("setwise coprime")
    else:
      print("not coprime")
      
gcd_p(count)