Root of the Problem#6058

Root of the Problem

1 second
122.174 megabytes
Very easy

Given positive integers and , find an integer such that a^n is as close as possible to . (The result is an approximation to the -th root of .)

Note that a^n may be less than, equal to, or greater than .

Input

Consists of one or more pairs of values for and . Each pair appears on a single line, delimited by a single space. A line specifying the value zero for both and marks the end of the input. The value of will be in the range to 10^6 (inclusive), and the value of will be in the range to (inclusive).

Output

For each pair and print as defined above on a line by itself.

Examples

Example 1

Loading
Loading