#include "stdio.h"
void main()
{
int days[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},
{31,29,31,30,31,30,31,31,30,31,30,31}};
int year,month,day,i,sum=0;
int leap;
printf("please input year and i:\n");
scanf("%d%d",&year,&i);
if((year%4==0&&year%100!=0)||(year%400==0))
leap=1;
else
leap=0;
for(month=1;sum<=i;month++)
{ sum=sum+days[leap][month-1];}
month=month-1;
if(sum>=i)day=days[leap][month-1]-(sum-i);
printf("%dyear %dmonth %dday\n",year,month,day);
}