Stamps

We want to send a postcard by mail. We need to stamp worth nn cents. Stamps have values 7 and 4 cents. As space is limited we want to know the minimum number of stamps we need to put on the postcard, without losing a cent.

Input

The input is a sequence of integer numbers. Each number in the sequence is greater than 1919.

Output

For each integer nn in the input, a line with two numbers p0p \ge 0 and q0q \ge 0 such that n=7p+4qn = 7p + 4q and p+qp+q is minimum among all possible choices.

Problem information

Author: Jorge Castro

Generation: 2026-01-25T22:34:18.823Z

© Jutge.org, 2006–2026.
https://jutge.org