n = int(input())
a = 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)

for i in range(n-1):
  for j in range(i+1:n):
    if gcd(a[i],a[j]) != 1:
      p = 1
      break
    else:
      p = 0
if p = 1:
  if gcd_list(a) == 1:
    p = 2
  else:
    p = 3

if p == 1:
  print("pairwise coprime")
elif p == 2:
  print("setwise coprime")
else:
  print("not coprime")