Server Time: Mon Oct 26, 2020 6:24 am
Welcome ( logout
C - Calculate Age
Ranklist
Time Limit: 0.5 second(s) Memory Limit: 16 MB

Read an integer value corresponding to a person's age (in days) and print it in years, months and days, followed by its respective message “year(s)”, “month(s)”, “day(s)”.

Note: only to facilitate the calculation, consider the whole year with 365 days and 30 days every month. In the cases of test there will never a situation that allows 12 months and some days, like 360, 363 or 364. This is just an exercise for the purpose of testing simple mathematical reasoning.

 

Input

The input file contains a non-zero positive integer value less than 30000.

 

Output

Print the output, like the following example.

X year

Y month

Z day

 

There is also a line break after last line. Use “years, months, days” if x/y/z is more geater than 1. Do not print the corresponding line if value is zero. Example- if y=0 then it will be like that,

X year

Z days

 

 

Sample Input

640

Sample Output

1 year

9 months

5 days

 

Sample Input

270

Sample Output

9 months

 

Sample Input

365

Sample Output

1 year

 


Problem Setter: Md Mahbub Alam
Special Thanks: Md Arafat Islam
Developed and Maintained by
JANE ALAM JAN
Copyright © 2012
LightOJ, Jane Alam Jan