import sys, math
input= sys.stdin.readline

N = int(input())
A_lst = list(map(int, input().split()))

def GCD(A, B):
  return math.gcd(A, B)

def LCM(A, B, g):
  return A*B//g

G = A_lst[0]
L = A_lst[0]
is_p = True
is_n = True
for a in A_lst[1:]:
  G = GCD(L, a)
  if is_p:
    if G!=1:
      is_p = False
  if is_n:
    if G == 1:
      is_n = False
  L = LCM(L, a, G)
if is_p:
  print('pairwise coprime')
elif is_n:
  print('not coprime')
else:
  print('setwise coprime')
