Inelastic neutron scattering measurements on Nd2Fe14B and Y2Fe14B single crystals