P27093 [AtCoder] 13th Month
普及-
题目描述

Problem Description

problemUrl

Given a year and month in the Gregorian calendar, output the corresponding year and month in the Unagi calendar. The details of the Unagi calendar are as follows:

The Unagi calendar was introduced starting from December 2013 in the Gregorian calendar, which corresponds to December 2013 in the Unagi calendar. In the Unagi calendar, the number of months in a year varies, with the Unagi year $Y$ consisting of $(Y-2000)$ months. For example, the Unagi year 2013 has 13 months, and the Unagi year 2014 has 14 months. The month changes simultaneously in both the Gregorian and Unagi calendars. That is, the month in the Gregorian calendar does not change in the middle of a month in the Unagi calendar, and vice versa. The following table shows examples of the correspondence between the Gregorian and Unagi calendars.

Table 1: Examples of Correspondence Between Gregorian and Unagi Calendars
| Gregorian | 2013年12月 | 2014年1月 | 2014年2月 | ... | 2014年12月 | 2015年1月 | ... | 2015年3月 | 2015年4月 |
| ---- | ---------- | --------- | --------- | ---- | ---- | ---- | ---- | ---- | ---- |
| Unagi | 2013年12月 | 2013年13月 | 2014年1月 | ... | 2014年11月 | 2014年12月 | ... | 2014年14月 | 2015年1月 |

Input Format

The input is given in the following format:

$Y$ $M$

$Y$ and $M$ are integers representing the year and month in the Gregorian calendar, respectively.

Output Format

Output the year and month in the Unagi calendar, separated by a space, in one line.

Sample Input and Output

Sample Input #1

2013 12

Sample Output #1

2013 12

Sample Input #2

2014 1

Sample Output #2

2013 13

Sample Input #3

12345 6

Sample Output #3

2498 315

Notes/Hints

Each variable in the input satisfies the following constraints:
- $2013 \leq Y \leq 10^{17}$
- $1\leq M\leq 12$
- The given year and month are after December 2013 in the Gregorian calendar.

Partial points are set for this problem. For 50 points of the test cases, the following additional constraint is also satisfied:
- $1 \leq Y \leq 10^5$

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2013 12
样例输出
2013 12