Are these inductors or resistors and what function do they serve?
I think they're 12K MELF resistors. So there's a 12K pull-down or pull-up, and a series 12K resistor to an input divider or something like that. The divider resistor appears to be 1.82K which would give about 3.2V for 24V in.
The choice of MELF resistors is probably related to power and voltage withstand under extreme EMI or fault conditions.
Try to trace out the circuit with a multimeter. Knowing the MCU supply voltage and the input voltage range is also useful.