Advertisement
Ivan has always been passionate about newspapers, dreaming of one day becoming an editor-in-chief. When he finally got the opportunity to pursue this dream, he was tasked with a test assignment: designing an advertisement layout.
The advertisement must fit within a rectangular field of width W and height H. It should consist of N words arranged in the given order. Each word i has a standard size, occupying a rectangle with width a_i and height b_i.
To ensure the advertisement is visually appealing, all words must be printed at the same scale. At a scale factor of k, the dimensions of each word are scaled by k. Thus, a word originally occupying a_i×b_i will, at scale k, occupy a rectangle of size (k·a_i)×(k·b_i). Additionally, if multiple words appear on the same line, they must all share the same height. Importantly, no word should exceed the boundaries of the field.
The illustration below provides an example of a well-designed advertisement featuring three words.
Your task is to help Ivan determine the maximum scale factor k that allows the advertisement to be typeset according to these rules. The words must be placed in the specified order, read line by line from top to bottom and left to right.
Input
The first line of the input contains three integers: N, W, and H (1 ≤ N ≤ 100000, 1 ≤ W, H ≤ 10^9) — representing the number of words, the width, and the height of the advertisement field, respectively. The following N lines each contain two integers a_i and b_i (1 ≤ a_i, b_i ≤ 10^9) — the width and height of the i-th word.
Output
Output a single real number k — the maximum scale factor. The result should be accurate to an absolute or relative error of no more than 10^{−9}. This means if the correct answer is a, and you provide p, your answer will be considered correct if ≤ 10^{−6}.