primes = [0 for i in range(10**6 + 5)]
idx = 0
ps=[0 for i in range(10**6)]
 
for i in range(2,len(primes)):
    if primes[i] == 0:
        ps[idx] = i
        idx +=1
        j = i+i
        while j <len(primes):
            primes[j] = 1
            j+=i
 
# print(ps[:100])
 
n=int(input())
arr=[int(c) for c in input().split()]
pariwise = True
setWise = True
ct = 0
 
for i in range(idx):
    prime = ps[i]
    # print(prime)
    count = 0
    for j in arr:
        if j%prime == 0:
            count+=1
    
    if count == n:
        setWise = False
    if count > 1:
        pariwise = False
    if (not setWise) and (not pariwise):
        break
 
if pariwise :
    print("pairwise coprime")
elif not pariwise and setWise:
    print("setwise coprime") 
else:
    print("not coprime")