#include <iostream>
#include <math.h>
using namespace std;

int round(double d)
{
    if(d>(double)(int(d)+1-0.5)) return int(d)+1;
    else return int(d);
}
void main()
{
    int n;
    cin >> n;
    int f = round((double)round((double)n/3)/12);
    int d = round((double)n/3)%12;
    cout << f << " "<< d;
    
}