import java.util.*;
import java.math.*;

public class anuj
    {
    public static void main(String args[])
        {
        Scanner c=new Scanner(System.in);
        int cm=c.nextInt();
        int inch=cm/3;
        if(cm%3==2)
            inch++;
        //System.out.println("inches= "+inch);
        System.out.println(inch/12+" "+inch%12);
        
        }
    }