Spectroscopy of neutron-rich Pd and Cd isotopes near A=120