n = int(input())
a = sorted(list(map(int, input().split())))
primes = [2]

from math import ceil, gcd, sqrt
from functools import reduce
for i in range(3, ceil(sqrt(max(a)))):
  for p in primes:
    if i % p == 0:
      break
  else:
    primes.append(i)
primesdic = {p: 0 for p in primes}

def pfact(x):
  for p in primes:
    if x % p == 0:
      if primesdic[p] > 0:
        return False
      primesdic[p] += 1
    if p > ceil(sqrt(x)):
      return True
  else:
    return True
      
for i in range(n):
  if i > 0 and a[i] > 1:
    if a[i] == a[i-1]:
      print('not coprime')
      break
  if not pfact(a[i]):
    if reduce(gcd, a) == 1:
      print('setwise coprime')
    else:
      print('not coprime')
    break
else:
  print('pairwise coprime')