Owl's Problem#1051

Owl's Problem

1 segundo
64 megabytes
Muy fácil (≈850)

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?

Entrada

The first line contains a single integer (0 < N \leq 2^{60}).

Salida

Output the two required numbers and , separated by a space, that satisfy the inequalities.

Ejemplos

Ejemplo 1

Loading
Loading