import java.util.Scanner;

public class IzmereniedlinvBadene
{public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int sm = sc.nextInt();
    int duim = (sm*10 + 15) / 30;
    int fut = duim  / 12;
    duim = duim % 12;
    System.out.print(fut + " " + duim);
}
}