
max_val = int(1e+6+1)
def make_kago(x):
    kago = [0 for _ in range(x+1)]
    sosuu = []
    for i in range(2,x+1):
        if kago[i] != 0:
            continue
        sosuu.append(i)
        for j in range(i, x+1, i):
            if kago[j] == 0:
                kago[j] = i
    return kago, sosuu

kago, sosuu = make_kago(max_val)

def prime_factorization(x):
    if x==0 or x==1:
        return None
    soinsuu = []
    while x!=1:
        soinsuu.append(kago[int(x)])
        x = x/kago[int(x)]
    
    soinsuu_dict = dict()
    for i in range(len(soinsuu)):
        if soinsuu[i] not in soinsuu_dict:
            soinsuu_dict[soinsuu[i]] = 1
        else:
            soinsuu_dict[soinsuu[i]]+=1
    return soinsuu_dict

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

exists = [0 for _ in range(int(1e+6+1))]

complete_ok = True
for i, A in enumerate(As):
    soinsuu_dict = prime_factorization(A)
    keys = list(soinsuu_dict.keys())
    for key in keys:
        if exists[key] != 0:
            complete_ok = False
        exists[key] += 1

part_ok = False
for i in range(len(exists)):
    if exists[i] == len(As):
        part_ok = True

if complete_ok == True:
    print("pairwise coprime")
elif part_ok == False:
    print("setwise coprime")
else:
    print("not coprime")