#include <iostream>
using namespace std;

void main()
{
        int a,b=0,n,temp;
    cin >> n;

    a = n/36;

    temp = n - n%36;

    n = n - temp;
    
    if (n>3)
    {
            temp = n%3;
    if(temp == 1)
    {
        b = n/3 + 1;
    }
    else
    {
        b = n/3;
    }
    }
    else if (n>=2)
        b = 1;

    cout << a <<" "<< b;
}