import java.util.*;

public class A125 {
    public static void main(String[] args) {
        new A125().solve();
    }

    public void solve() {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int b = Math.round(n / 3.0f);
        int a = b / 12;
        b = b % 12;
        System.out.println(a + " " + b);
    }
}
