Interfacing 24 volts PNP capacitive proximity sensor to arduino UNO

I'm sure there is something very obvious that I'm not figuring out, and I'd appreciate the help!

I've got a 24V PNP capacitive proximity sensor, and I want to read it as an input to the arduino. How should this sensor be connected?,
how to make the output signal of the sensor to became 5 volts to became compatible to arduino. since the signal output is 24 volts.

thanks for the Help.

voltage divider.