It's Not A Magic SquareDiscrete Mathematics Level 4
In how many distinct ways can I fill a \(3\times3\) grid with the integers 1 through 9 (each occurring exactly once) such that all cells in the grid are coprime with the neighbors? (Note that rotations and reflections count as distinct ways of filling the grid.)
Clarification: A cell's neighbors are the cells that share a full side with it. If two cells share a corner but not a side, they are not neighbors.