N = int(input())
A = list(map(int, input().split()))
E  = 1000000
B = [0]*(E+1)

seek = [False]*(E + 1)
sosu = [[] for _ in range(E+1)]

for n in range(2, E + 1):
    num = 1
    while (n * num) < E+1:
        if seek[n * num] == False:
            seek[n * num] = True
        sosu[n * num].append(n)
        num += 1
#print(sosu)

for a in A:
    for num in sosu[a]:
        B[num] += 1

#print(B)

f1 = False
f2 = False

for b in B:
    if b >= 2:
        f1 = True
    if b == N:
        f2 = True

if f1 == True and f2 == False:
    print('setwise coprime')
elif f1 == False:
    print('pairwise coprime')
else:
    print('not coprime')
