from sys import stdin
import math
from functools import reduce
from itertools import combinations

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

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

a = 1
b = 0

n = int(stdin.readline().rstrip())
listA=list(map(int,input().split()))
for i in range(0, len(listA)):
  for k in range(i+1, len(listA)):
    if math.gcd(listA[i], listA[k]) != 1:
      a = 0
      break
    else:
      continue
if gcd(*listA) == 1:
  b = 1
if a == 1:
  print("pairwise coprime")
elif b == 1:
  print("setwise coprime")
else:
  print("not coprime")