#39Medium
Next date
Time: 1 s · Memory: 256 MB
- Conditionals
Statement
You are given a date in a non-leap year: day and month . Find the date of the next day.
Days per month: January , February , March , April , May , June , July , August , September , October , November , December .
The given date may not exist (for example, April or month ) — then print -1.
Input format
A single line with two integers and ().
Output format
The day and month of the next day — two numbers on one line. If the date does not exist — -1.
Examples
Input
7 7
Output
8 7
Input
31 1
Output
1 2
Note
There are three cases: the month is not over — day ; the month is over but the year is not — day of the next month; December — January . Get the number of days in a month with a switch or a -element list.
