import numpy as np

N = int(input())
A = input().split()

count = np.zeros(1001,dtype=int)

for i in A:
  Ai = int(i)
  for j in range(2, 1001):
    if Ai % j == 0:
      count[j]  += 1

mc = max(count) 
if mc == 1:
  print("pairwise coprime")
elif mc < N:
  print("setwise coprime")
else:
  print("not coprime")