import math
from functools import reduce
def make_divisors(n):
  lower_divisors , upper_divisors = [], []
  i = 2
  while i*i <= n:
    if n % i == 0:
      lower_divisors.append(i)
      if i != n // i:
        upper_divisors.append(n//i)
    i += 1
  return lower_divisors + upper_divisors[::-1]
def gcd(*numbers):
  return reduce(math.gcd, numbers)
n=int(input())
a=list(map(int,input().split()))
d={}
flg=0
if gcd(*a)!=1:
  print('not coprime')
else:
  for i in a:
    for j in make_divisors(i):
      if d.get(j,0)==0:
        d[j]=1
      elif flg==0:
        print('setwise coprime')
        flg=1
  if flg==0:
    print('pairwise coprime')