#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<conio.h>
#include<math.h>

main()
{
    int i,j, cm, feet, inch;
                                                        //1 feet= 12 inc
    scanf("%d", &cm);                                   //1 inch = 3 cm

    feet=cm/36;

    inch=(cm%36)/3;


    inch=(int)ceil((cm%36)/3.0) ;




    printf("%d %d",feet, inch);
}


