According to Coulomb’s law, the ionic compound A–D has the smallest electrostatic potential energy is NaI.
because electrostatic potential depends on the charge whether it is positive or negative. since here, all of them F, Cl, Br and I have a negative charge. And the sizes of F < Cl < Br < I are in this order.