import math
def a(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    for i in pr:
        if n % i == 0:
            lower_divisors.append(i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
def primes(n):
    candidate = list(range(2, n+1))
    prime = []
    limit = n**0.5 + 1
    while True:
        p = candidate[0] 
        if limit <= p:
            prime.extend(candidate)
            break
        prime.append(p)

        candidate = [i for i in candidate if i % p != 0]
    return prime
N=int(input())
pr=primes(1000)
L=list(map(int,input().split()))
gc=L[0]
for i in L:
  gc=math.gcd(i,gc)
  if gc==1:
    break
if gc!=1:
  print("not coprime")
  exit()
ans=set()
c=0
for i in L:
  c+=len(a(i))
  ans=set(a(i))|ans
if c==len(ans):
  print("pairwise coprime")
else:
  print("setwise coprime")