
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A125 {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));

        int cm = Integer.parseInt(br.readLine());

        if (cm % 3 == 1) --cm;
        else if (cm % 3 == 2) ++cm;

        int feet = cm / 36;
        int inch = (cm - 36 * feet) / 3;
        ;

        System.out.println(feet + " " + inch);

    }

}
