The good news is that Ryanair does allow for a modicum of flexibility. Those numbers can represent any three angles of your bag, so a suitcase that is 40 cm long is just as acceptable as a backpack that is 40 cm tall, as long as the other two edges stay within the lines.