def prime_factorize(n):
    a = []
    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

def gcd(a,b):
  while b:
    a,b = b,a%b
  return a  
  
n = int(input())
A = list(map(int,input().split()))

p = A[0]
for a in A[1:]:
  p = gcd(a,p)

primes = [0]*(10**6+2)
  
for a in A:
  B = set(prime_factorize(a))
  for b in B:
    primes[b]+=1
  
  
if p == 1:
  if max(primes)==1:
    print('pairwise coprime')
  else:
    print('setwise coprime')
else:
  print('not coprime')