
import java.util.Scanner;
import java.io.*;
public class Xtend {

public static void main(String[] args)throws IOException{
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%3==2){
	n++;
}else if(n%3==1){
	n--;
}
int r=n/36;
n-=(r*36);
int a=n/3;

System.out.println(r+" "+a);
}

}