N = int(input())
Alist = list(map(int,input().split()))
# import time
# import random
# Alist = [random.randint(1,1000000) for i in range(1000000)]
# tt = time.time()
def GCD(a,b):
    if a>b:
        a = a%b
        if a == 0:
            return(b)
        else:
            return GCD(a,b)
    else:
        b = b%a
        if b == 0:
            return(a)
        else:
            return GCD(a,b)

isPC = True
isSC = False
kouyaku = 1
skipindex = 0
prod = 1

for i,x in enumerate(Alist[1:]):
    prod*=Alist[i]
    # print(x,prod)
    if GCD(x,prod)>1:
        isPC = False
        kouyaku = GCD(x,prod)
        break

if kouyaku > 1:
    for x in Alist:
        kouyaku = GCD(x,kouyaku)
        if kouyaku == 1:
            isSC = True
            break

if isPC:
    print('pairwise coprime')
elif isSC:
    print('setwise coprime')
else:
    print('not coprime')
# print(time.time() - tt)