import math
import numpy
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

m = int(input())
a = list(map(int, input().split()))
max_int = math.ceil(math.sqrt(a[m-1]))

tmp = gcd_list(a)

if tmp > 1:
  print("not coprime")
else:
  pro = numpy.prod(a)
  ans = a[0]
  for i in range(1,m):
    ans *= a[i] // math.gcd(ans,a[i])
  if ans == pro:
    print("pairwise coprime")
  else:
    print("setwise coprime")