Everyone knows that the most intelligent animal in the forest is the Owl. To be so wise, it is necessary to read a lot, so the Owl spends most of its free time with books in the library.
While reading one of its favorite books, Encyclopedia of Problems in Mathematics, the Owl found the following formula:

The inquisitive Owl is interested in the following question: for which maximum integer and minimum integer , such that and are also integers, does the inequality S(A) \leq S(N) \leq S(B) hold?
The first line contains a single integer (0 < N \leq 2^{60}).
Output the two required numbers and , separated by a space, that satisfy the inequalities.
Example 1