Algorithm


A. Measuring Lengths in Baden
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Lengths are measures in Baden in inches and feet. To a length from centimeters it is enough to know that an inch equals three centimeters in Baden and one foot contains 12 inches.

You are given a length equal to n centimeters. Your task is to convert it to feet and inches so that the number of feet was maximum. The result should be an integer rounded to the closest value containing an integral number of inches.

Note that when you round up, 1 cm rounds up to 0 inches and 2 cm round up to 1 inch.

Input

The only line contains an integer n (1 ≤ n ≤ 10000).

Output

Print two non-negative space-separated integers a and b, where a is the numbers of feet and b is the number of inches.

Examples
input
Copy
42
output
Copy
1 2
input
Copy
5
output
Copy
0 2



 

Code Examples

#1 Code Example with C++ Programming

Code - C++ Programming

#include <cstdio>

int main(){

    long n; scanf("%ld\n", &n);

    if(n % 3 == 1){--n;}
    else if(n % 3 == 2){++n;}

    long feet = n / 36;
    long inches = (n - 36 * feet) / 3;

    printf("%ld %ld\n", feet, inches);

    return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
42

Output

x
+
cmd
1 2
Advertisements

Demonstration


Codeforces Solution-A. Measuring Lengths in Baden-Solution in C, C++, Java, Python

Previous
Codeforces solution 1080-B-B. Margarite and the best present codeforces solution
Next
CodeChef solution DETSCORE - Determine the Score CodeChef solution C,C+