from fractions import gcd
N = int(input())
A = list(map(int, input().split()))
C = [0 for i in range(10 ** 6)]
for a in A:
  C[a-1] = 1
pairwise = True
for i in range(2, 10 ** 6):
  count = 0
  for j in range(i, 10 ** 6, i):
    count += C[j-1]
  if count > 1:
    pairwise = False
if pairwise:
  print("pairwise coprime")
else:
  g = A[0]
  for i in range(1, N):
    g = gcd(g, A[i])
  if g == 1:
    print("setwise coprime")
  else:
    print("not coprime")