from math import sqrt
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()

#print(time.time() - tt)
# make primelist
primelist = list(range(1,int(sqrt(max(Alist)))+1))
for n in primelist:
    if n >1:
        for m in range(n*2,len(primelist),n):
            primelist[m-1]=1
primelist=list(set(primelist))


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

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

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')