import java.util.*;

public class dynasty {
    public static void main(String[] args) throws Exception{
        new dynasty().run(args);
    }

    
    private void run(String[] args) throws Exception{
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int inch = Math.round((float)n/3);
        int feet = inch/12;
        inch = inch-feet*12;
        System.out.println(feet + " " + inch);
    }
}
