import math
from collections import defaultdict as dd

def get_prime_factors(n):
  prime_factor = set()
  divided = n
  for i in range(2, int(math.sqrt(n)//1)+1):
    while divided%i == 0:
      prime_factor.add(i)
      divided //= i
  if divided != 1:
    prime_factor.add(divided)
  return prime_factor

N = int(input())
A = list(map(int, input().split()))
factor_dict = dd(int)

for a in A:
  factor_a = get_prime_factors(a)
  for f in factor_a:
    factor_dict[f] += 1

max_t = max(factor_dict.values())
if max_t == 1:
  print("pairwise coprime")
elif max_t < N:
  print("setwise coprime")
else:
  print("not coprime")