~/algor $ cat problems/oldingi-sana
Previous date
Easy
1000 ms
64 MB
25%
A valid date of a non-leap year is given: day $D$ and month $M$. Find the day and month of the previous day. February has $28$ days; December 31 comes before January 1.
Input
One line with two integers: $D$ and $M$.
Output
One line with two integers: the day and month of the previous day.
Note
$1 \le M \le 12$
$1 \le D \le 31$
The date is guaranteed to be valid.
Examples
Input #1
2 3
Output #1
1 3
Input #2
1 3
Output #2
28 2