import java.util.*;
import java.io.*;
import java.awt.Point;
import static java.lang.Math.*;

public class P125A {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int inches = 0;
        if(n%3 == 2)
            inches = (n+1)/3;
        else inches = n/3;
        int feet = inches/12;
        inches = inches%12;
        System.out.println(feet+" "+inches);
    }
}
