import static java.lang.Math.min;
import java.util.*;
import java.io.*;
import java.math.*;

public class Solution implements Runnable
{
    
 //  fucking nigga

      void solve() throws IOException
        {
          int n=readInt();
          int a=n/36;
          int b=(n%36);
         if(b%3==1)
             b=b/3;
         else if(b%3==2)
             b=b/3+1;
         else b=b/3;
         out.println(a+" "+b);
            
        

        }


        public static void main(String args[])
        {
                new Solution().run();
        }
        
        BufferedReader reader;
        PrintWriter out;
        StringTokenizer tokenizer;

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

        int readInt() throws IOException
        {
                return Integer.parseInt(readString());
        }

        long readLong() throws IOException
        {
                return Long.parseLong(readString());
        }

        double readDouble() throws IOException
        {
                return Double.parseDouble(readString());
        }

        BigInteger readBigInteger() throws IOException
        {
                return new BigInteger(readString());
        }

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