def sieve_eratosthenes(n):
    primes = [0, 1] * (n // 2 + 1)
    if n % 2 == 0:
        primes.pop()
    primes[1] = 0
    primes[2] = 1
    for p in range(3, n + 1, 2):
        if primes[p]:
            for q in range(p * p, n + 1, 2 * p):
                primes[q] = 0
    return primes

N = int(input())
A = list(map(int,input().split()))
P = sieve_eratosthenes(10**6)
Ps = []
for i in range(10**6):
    if P[i]==1:
        Ps.append(i)
PN = len(Ps)

if N>PN+1:
    print("Not coprime")
else:
    flag = 0
    pf={}
    for i in range(N):
        pf1 = {}
        m=A[i]
        for i in range(2,int(m**0.5)+1):
            while m%i==0:
                pf1[i]=pf1.get(i,0)+1
                m//=i
        if m>1:pf1[m]=1
        for i in pf1.keys():
            pf[i]=pf.get(i,0)+1
            if pf[i]>1:
                flag = 1
    if flag==0:
        print("pairwise coprime")
    else:
        import fractions
        ans = A[0]
        for i in range(1, N):
            ans = fractions.gcd(ans, A[i])
        if ans==1:
            print("setwise coprime")
        else:
            print("not coprime")
