import math
import sys
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0 
    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]

n=int(input())
alist=list(map(int, input().split()))
amax=max(alist)
if n<=len(primes(amax+1)):
  blist=[0]*1000001
  for i in alist:
    for j in factorization(i):
      blist[j[0]]+=1
  cnt=1
  for i in primes(amax+1):
    cnt=max(cnt,blist[i])
  if cnt==1:
    print('pairwise coprime')
    sys.exit()
num=alist[0]
for i in range(n):
  num=math.gcd(num,alist[i])
if num==1:
  print('setwise coprime')
else:
  print('not coprime')