The hydrogenation of CN on Pd(111) and Pd(100)