Problem One


The "Endianness" of a number depends on where you write the most significant digit. In the decimal system, the number 3025 has the most significant digit on the left (the 3 standing for three thousand). This is called “Big-Endian”.

“Little-Endian” is the exact opposite, i.e., the most significant digit would be written on the right. For example, the number above would be written as 5203 in Little-Endian.

Input File -

On each line, you will be presented with 2 integers, b and N. Input terminates when b ≤ 1. Otherwise, b ≤ 65536, and 0 ≤ N < 231.

Sample Input File

10 3025
2 5
256 16777217
1 69

Output Requirements - System.out (terminal output)

For each case, you will determine whether the number N, written in base b would look the same or different in Big-Endian as in Little-Endian. Match the sample output format below.

Sample Output