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.floor(n/36.0);
        double inches = Math.round((double)((long)n%36)/3.0);
        System.out.printf("%.0f %.0f",feet,inches);
    }
}