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

public class codeforces implements Runnable {
                
        void solve() throws IOException {
            int n = nextInt();

            int inch = n/3;
            if(n%3==2)
                inch++;

            int feet = inch/12;
            inch = inch%12;
            writer.println(feet+" "+inch);
         }
        

        BufferedReader reader;
        StringTokenizer tokenizer;
        PrintWriter writer;

        public void run() {
            try {
                reader = new BufferedReader(new InputStreamReader(System.in));
                writer = new PrintWriter(System.out);
                //reader = new BufferedReader(new FileReader("input.txt"));
                //writer = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
                tokenizer = null;
                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();
        }

        public static void main(String[] args) {
                new codeforces().run();
        }

}