FERMAT 2024 Problem 16

Francesca put one of the integers 1,2,3,4,5,6,7,8,9 in each of the nine squares of the 3 by 3 grid shown. No integer is used twice. She calculated the product of the three integers in each row and wrote the products to the right of the corresponding rows. She calculated the product of the integers in each column and wrote the products below the corresponding columns. Finally, she erased the integers from the nine squares.
fermat 2024 16

Which integer was in the square marked N ?

Answer Choices
A. 3
B. 4
C. 6
D. 8
E. 9