
import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author utp
 */
public class Main{
    
    public static void main(String Args[]){
        Scanner sc = new Scanner(System.in);
        double cent = sc.nextDouble();
        int pulg = (int)(Math.round(cent/3));
        System.out.println((pulg/12)+" "+(pulg%12));
    }
    
    
}
