def numero_interieur(z): y, x = divmod(z, 8) return 0 <= x <= 6 and 0 <= y <= 6 and abs(x - 3) + abs(y - 3) <= 4