Link-Cut Dumplings
Chmyaaax likes dumplings very much, so after he had arrived from LCOI (Link-Cut Olympiad in Informatics), he decided to eat some. But, unfortunately, at the time he was at the olympiad, the Link-Cut system has been rebuilt.
Now the system is a limited plane in the shape of a square with side length with its corners located at the points , , and . In each point, there is a restaurant, where it is possible to buy dumplings. Also, there is a function that defines the deliciousness of the dumpings in the restaurant in the point :
where the sign represents bitwise XOR operation, the sign — bitwise OR operation and the sign — bitwise AND operation.
Chmyaaax wants to taste the most tasty dumplings he can find in the Link-Cut system, thus he wants to now, among all restaurants in the system, what is the largest deliciousness of dumplings, and how many restaurants with this deliciousness there are. Please, help him to determine these two values.
Since the number of restaurants can be very large, please, output this value modulo .
Input
A single line contains one integer () — the length of the side of the Link-Cut system.
Output
In a single line, you need to output two integers: the maximum deliciousness of the dumplings that can be found among all the restaurants and the number of restaurants with this value of deliciousness modulo . Please, note that the maximum deliciousness should be output as it is in the answer (i.e., not modulo ).
Examples
Note
In the first example, here are all the points and the values of dumplings deliciousness in restaurants at them:
: 0
: 2
: 4
: 6
: 2
: 2
: 6
: 6
: 4
: 6
: 4
: 6
: 6
: 6
: 6
: 6
As we can see, the maximum deliciousness of all these restaurants is and there are points having it.
In the second example, there are points of restaurants with deliciousness of :
:
:
:
:
:
:
It can be shown that there are no restaurants in the given borders with deliciousness of more than .
Scoring
( points): ;
( points): , for some integer ;
( points): ;
( points): , for some integer ;
( points): no additional constraints.