N = int(input())
Alist = list(map(int,input().split()))
Aprimes = []
isPC = True
isSC = False
# import time
# import random
# Alist = [random.randint(1,1000000) for i in range(1000000)]
# tt = time.time()

# make primelist
primelist = list(range(1,max(Alist)+1))
for item in primelist[1:]:
    for i in range(2,primelist[-1]//item+1):
        i*=item
        if i in primelist:
            primelist.remove(i)

def get_prime(a):
    primes = []
    for p in primelist[1:]:
        if p>a:
            break
        elif a%p == 0:
            primes.append(p)
    return primes

for a in Alist:
    p = get_prime(a)
    # if len(p)>1:
    Aprimes.append(p)

factors = []
cofactors = Aprimes[0]
# cofactors.remove(1)
for a in Aprimes:
    for p in a:
        if p in factors:
            isPC = False
        else:
            factors.append(p)
    for f in cofactors.copy():
        if f not in a:
            cofactors.remove(f)


if isPC:
    print('pairwise coprime')
elif len(cofactors)>0:
    print('not coprime')
else:
    print('setwise coprime')