408497: GYM103158 B Zero equals Infinity!

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Zero equals Infinity!time limit per test2 secondsmemory limit per test64 megabytesinputpolygon.inoutputstandard output

Two of the judges discussed an interesting question. For a polygon with a given Perimeter P, if we want to maximize the area A, should we decrease or increase the number of sides?

After they searched on the internet, they found that the circle is the best shape to maximize A given P, but they still couldn't agree if the circle has 0 or sides.

You can't convince them just by choosing one direction. So you will write a program that takes P and a value X, find the number of sides S such that all polygons with S sides and P Perimeter have ratio not larger than but as close as possible to X where A is the area of the polygon.

If the answer is 0 output "Khairy" instead. If the answer is output "KEE" instead.

Input

The first line of the input contains one integer T (1 ≤ T ≤ 100) the number of test cases.

Each test case contains two numbers P and X (1 ≤ P ≤ 106, 1 ≤ X ≤ P). X is a fractional value with no more than 3 digit after the decimal point.

Output

For each test case, output S the number of sides of a polygon such that isn't larger than but as close as possible to X.

If the answer is 0 output "Khairy" instead. If the answer is output "KEE" instead.

ExampleInput
4
50 3.975
100 7.600
40 2.000
1000000 79577.400
Output
58
8
3
1912

Source/Category

加入题单

上一题 下一题 算法标签: