import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;


public class Solution {
	static PrintWriter bw;
	static BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
	public static void main(String [] args) throws IOException{
		bw = new PrintWriter(new OutputStreamWriter(System.out));
		String s[]=br.readLine().split(" ");
		int n = Integer.parseInt(String.valueOf(s[0]));
        int a,b;
        a = n/36;
        b=(n-a*36+1)/3;
        if (n%36==35) {a++; b = 0;}
		bw.printf("%d %d",a,b);
		bw.close();
}
		
}
