from collections import deque
import sys
N = int(input())
A = list(map(int,input().split()))
def prime_factorize(n):
    a = deque()
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
PA = deque()
c = 0
k = 0
mflag = 12
mnum = 0
for i in range(N):
  tA = A[i]
  a = prime_factorize(tA)
  a = set(a)
  PA.extend(a)
  la = len(a)
  c += la
  if la < mflag:
    mflag = la
    mnum = A[i]
am = set(PA)
cm = len(am)
if cm == c:
  print('pairwise coprime')
  sys.exit()
A.remove(mnum)  
am = prime_factorize(mnum)
am = set(am)
lA = len(A)
for i in am:
  k = 0
  for j in range(lA):
    if A[j] % i == 0:
      k += 1
  if k == lA:
    print('not coprime')
    sys.exit()
print('setwise coprime')  