

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.*;
import java.util.*;
import java.io.*;

public class Main implements Runnable 
{
    private void solve() throws IOException 
    {
        int n = nextInt();
        int feet = n / 36;
        n = n - feet * 36;
        int inch = n / 3;
        if(n - inch * 3 >= 2) ++inch;
        if(n == 35) 
        {
            ++feet; inch = 0;
        }
        System.out.println(feet + " " + inch);      
    }
    
    public static void main(String[] args) 
    {
        new Main().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() 
    {
        try 
        {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } 
        catch (Exception e) 
        {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException 
    {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException 
    {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException 
    {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException 
    {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) 
        {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}
