#e
N=int(input())
A=list(map(int,input().split()))

sosuu = [2]
import math
max_prime = int(math.sqrt( min(A) ))+2
for L in range(3, max_prime, 2):
    if all(L % L2 != 0 for L2 in sosuu): 
        sosuu.append(L)

pair_coprime=True
set_coprime=True

for p in sosuu:
    s = sum(aa%p==0 for aa in A)
    if s>=2:
        pair_coprime=False
    if s==N:
        set_coprime=False
        
if pair_coprime:
    print("pairwise coprime")
elif set_coprime:
    print("setwise coprime")
else:
    print("not coprime")