import java.util.Scanner;
public class Main {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int year=n/365;
int mouth=(n-(year*365))/30;
int day=n-(365*year)-(30*mouth);
System.out.println(year+" "+"ano(s)");
System.out.println(mouth+" "+"mes(es)");
System.out.println(day+" "+"dia(s)");
}
}