import java.util.*;
import java.io.*;

public class Solution125A
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(inp.readLine());
        int n = Integer.parseInt(st.nextToken());
        int foot = 0;
        while(n >= 36)
        {
            foot++;
            n -= 36;
        }
        int inch = 0;
        while(n >= 3)
        {
            inch++;
            n -= 3;
        }
        if(n == 2) inch++;
        System.out.print(foot + " " + inch);
    }
}