import java.io.*;


public class baden
{
public static void main(String args[])
{
int n,a,b,c;
try
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
n=Integer.parseInt(br.readLine());
a=n/3;
b=0;
if(a>0)
{
n=n-a*3;
b=a/12;
if(b>0)
{
a=a-b*12;
}
}
if(n>1)
a=a+1;
if(a==12)
{
b=b+1;
a=0;
}
System.out.println(b+" "+a);
}
catch(Exception e)
{
System.out.println(e);
}
}
}