n = 1000
primes = set(range(2, n+1))
for i in range(2, int(n**0.5+1)):
    primes.difference_update(range(i*2, n+1, i))
primes=list(primes)

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

Fpr = {}

for i in range(N):
  for p in primes:
    if A[i]%p != 0:
      continue
    while A[i]%p == 0:
      A[i] //= p
    if p in Fpr:
      Fpr[p] += 1
    else:
      Fpr[p] = 1
    
res = 0
for k in Fpr:
  res = max(res,Fpr[k])
if res == 1:
  print("pairwise coprime")
elif res == N:
  print("not coprime")
else:
  print("setwise coprime")