In-beam spectroscopy of 126Ce and 127Pr