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

#素数
def primes(n):
    n, correction = n-n%6+6, 2-(n%6>1)
    sieve = [True] * (n//3)
    for i in range(1, int(n**0.5)//3+1):
        if sieve[i]:
            k = 3*i+1|1
            sieve[k*k//3::2*k] = [False] * ((n//6-k*k//6-1)//k+1)
            sieve[k*(k-2*(i&1)+4)//3::2*k] = [False] * ((n//6-k*(k-2*(i&1)+4)//6-1)//k+1)
    return [2, 3] + [3*i+1|1 for i in range(1, n//3-correction) if sieve[i]]

#素因数分解
n=1000000
primelist=set(primes(int(n**0.5+1))+[n+1])
def primeset(n):
    factors=set()
    for prime in primelist:
        if prime>n:
            factors.add(n)
            break
        while n%prime==0:
            n=n//prime
            factors.add(prime)
    for i in factors:
        if i in primelist:
            primelist.remove(i)
    return n

from math import gcd
def lcm(a,b):
    return a*b//gcd(a,b)

pairprime_flag=True
allgcd=A[0]
allprime=set()

for a in A:
    allgcd=gcd(allgcd,a)
    st = primeset(a)
    if st==1:
        continue
    if st!=1:
        pairprime_flag=False

if pairprime_flag:
    print('pairwise coprime')
elif allgcd==1:
    print('setwise coprime')
else:
    print('not coprime')
