
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();
int r=n/36;
n-=(n/36)*36;
int a=n/3;
if(n%3>1){
	a++;
}
System.out.println(r+" "+a);
}

}