import java.util.*;
import java.io.*;
public class A125 {
    public static void main(String[] args) throws IOException {
        Scanner s = new Scanner(System.in);
        double cm = s.nextDouble();
        int inches = (int)Math.round(cm/3.0);
        System.out.printf("%d %d%n",inches/12,inches%12);
    }
}
