import java.io.*;
import java.util.*;

public class p125a
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        double n = sc.nextDouble();
        double feet = Math.round(n/36.0);
        double rest = n - feet*36.0;
        double inches = 0.0;
        if(rest>0) inches = Math.round((double)((long)rest%36)/3.0);
        System.out.printf("%.0f %.0f",feet,inches);
    }
}