N = int(input())

from math import gcd
prime = [0] * 2 + [1] * (10 ** 6 - 1)
A = list(map(int, input().split()))
A.sort()
for i in range(2, 10 ** 3 + 1):
  if prime[i]:
    for j in range(2 * i, 10 ** 6 + 1, i):
      prime[j] = 0
P = [i for i in range(2, 10 ** 6) if prime[i]]
from bisect import bisect
S = bisect(A, 1)
if N - S <= len(P):
  T = 1
  for p in P:
    count = 0
    for i in range(bisect(A, p), N):
      if A[i] % p == 0:
        count += 1
    if count > 1:
      T = 0
      break
  if T:
    print('pairwise coprime')
    exit()
g = 0
for a in A:
  g = gcd(g, a)
if g == 1:
  print('setwise coprime')
  
else:
  print('not coprime')