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

import math
import sys

def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    D=list(range(2,n+1))
    while True:
        l=len(data)
        p = data[0]
        if limit <= p:
            return D
        prime.append(p)
        temp=[]
        for i in range(l):
          if data[i]%p!=0:
            temp.append(data[i])
          else:
            D[data[i]-2]=p
        data=temp

B=get_sieve_of_eratosthenes(10**6)
        
def fac(n):
  s=set()
  k=n
  while k!=B[k-2]:
    s.add(B[k-2])
    k=k//B[k-2]
  s.add(k)
  return s

com=set()
g=0
for i in range(N):
  g=math.gcd(g,A[i])
  if com=={0}:
    continue
  if fac(A[i])&com==set():
    com=com.union(fac(A[i]))
  else:
    com={0}

if com!={0}:
  print("pairwise coprime")
  sys.exit
elif g==1:
  print("setwise coprime")
else:
  print("not coprime")