

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class A implements Runnable {

	private void Solution() throws IOException {
		int n = nextInt(), d = 0, f = 0;
		if (n % 36 > 17)
			f = n/36 + 1; else
				f = n/36;
		n = n - 36*(n/36);
		if (n % 3 > 1)
			d = n/3 + 1; else
				d = n/3;
		System.out.println(f + " "+ d);
	}
	
	public static void main(String args[]) {
		new A().run();
	}
	
	BufferedReader in;
	StringTokenizer tokenizer;
	
	public void run() {
		try {
            in = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            Solution();
            in.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}
	
	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(in.readLine());
		return tokenizer.nextToken();
	}
}
