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

public class MeasuringLengthsInBaden {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(f.readLine());
        int inches = (n+1)/3;
        System.out.println(inches/12+" "+inches%12);
    }
}