class
GFG{
public
static
void
getDate(
int
d, String m)
{
int
[] days = {
31
,
29
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
};
String[] month = {
"January"
,
"February"
,
"March"
,
"April"
,
"May"
,
"June"
,
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
int
cnt =
183
;
int
cur_month =
0
;
for
(
int
i =
0
; i <
12
; i++)
if
(m == month[i])
cur_month = i;
int
cur_date = d;
while
(
true
)
{
while
(cnt >
0
&& cur_date <= days[cur_month])
{
cnt -=
1
;
cur_date +=
1
;
}
if
(cnt ==
0
)
break
;
cur_month = (cur_month +
1
) %
12
;
cur_date =
1
;
}
System.out.println(cur_date +
" "
+
month[cur_month]);
}
public
static
void
main(String args[])
{
int
D =
15
;
String M =
"January"
;
getDate(D, M);
}
}