CheckSum#270

CheckSum

0.1 seconds
64 megabytes
Easy

Your task is to find a way to calculate a checksum for a given text message. The following restrictions must be fulfilled:

  1. The checksum is a two-byte non-negative integer.

  2. If we consider the initial text message as a very long binary number (the first byte of the message is treated as the most significant byte of the binary number) and append to it the calculated two-byte checksum, then the new long binary number leaves a remainder when divided by the given number .

  3. If several integers satisfy the previous condition, the checksum is the minimal of such numbers.

  4. The number equals .

Input

The input file contains a non-empty text string of at most ASCII characters.

Output

Output the calculated checksum as two hexadecimal numbers separated by a single space (the most significant and least significant bytes of the checksum, respectively). Each hexadecimal number must consist of exactly two digits.

Examples

Example 1

Loading
Loading