import java.util.Scanner;

public class P125A
{

    public static void main(String[] args)
    {
        Scanner inScanner = new Scanner(System.in);
        int n = inScanner.nextInt();
        if (n % 3 == 1)
            n--;
        else if (n % 3 == 2)
            n++;
        int a = n / 36;
        int b = (n - (36 * a)) / 3;
        System.out.println(a + " " + b);
    }
}
