Magnetic and NMR investigations of Nd2Co14B and Y2Co14B compounds