import java.io.*;
public class j
{
public static void main(String a[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int k=0,m=0,n=0;
n=Integer.parseInt(b.readLine());
System.out.print(n/36);
n=n%36;
k=n/3;
m=n%3;
if(m==0||m==1)
System.out.print(" "+k);
else
System.out.print(" "+(k+1));
}
}