CF919A.Supermarket

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Supermarket

We often go to supermarkets to buy some fruits or vegetables, and on the tag there prints the price for a kilo. But in some supermarkets, when asked how much the items are, the clerk will say that aa yuan for bb kilos (You don't need to care about what "yuan" is), the same as a/ba/b yuan for a kilo.

Now imagine you'd like to buy mm kilos of apples. You've asked nn supermarkets and got the prices. Find the minimum cost for those apples.

You can assume that there are enough apples in all supermarkets.

Input

The first line contains two positive integers nn and mm (1n50001 \leq n \leq 5\,000, 1m1001 \leq m \leq 100), denoting that there are nn supermarkets and you want to buy mm kilos of apples.

The following nn lines describe the information of the supermarkets. Each line contains two positive integers a,ba, b (1a,b1001 \leq a, b \leq 100), denoting that in this supermarket, you are supposed to pay aa yuan for bb kilos of apples.

Output

The only line, denoting the minimum cost for mm kilos of apples. Please make sure that the absolute or relative error between your answer and the correct answer won't exceed 10610^{-6}.

Formally, let your answer be xx, and the jury's answer be yy. Your answer is considered correct if xymax(1,y)106\frac{|x - y|}{\max{(1, |y|)}} \le 10^{-6}.

Note

In the first sample, you are supposed to buy 55 kilos of apples in supermarket 33. The cost is 5/35/3 yuan.

In the second sample, you are supposed to buy 11 kilo of apples in supermarket 22. The cost is 98/9998/99 yuan.

Samples

3 5
1 2
3 4
1 3
1.66666667
2 1
99 100
98 99
0.98989899

在线编程 IDE

建议全屏模式获得最佳体验