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

main()
{
    int i,j, cm, feet, inch;

    scanf("%d", &cm);

    feet=cm/36;

    inch=(int)ceil((double)(cm%36)/3);




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


