{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"The FORTH programming language does not support floating-point arithmetic at all. Its author, Chuck Moore, maintains that floating-point calculations are too slow and most of the time can be emulated by integers with proper scaling. For example, to calculate the area of the circle with the radius R he suggests to use formula like R * R * 355 / 113, which is in fact surprisingly accurate. The value of 355 / 113 ≈ 3.141593 is approximating the value of PI with the absolute error of only about 2*10\u003csup\u003e-7\u003c/sup\u003e. You are to find the best integer approximation of a given floating-point number A within a given integer limit L. That is, to find such two integers N and D (1 \u0026lt;\u003d N, D \u0026lt;\u003d L) that the value of absolute error |A - N / D| is minimal."}},{"title":"Input","value":{"format":"HTML","content":"The first line of input contains a floating-point number A (0.1 \u0026lt;\u003d A \u0026lt; 10) with the precision of up to 15 decimal digits. The second line contains the integer limit L. (1 \u0026lt;\u003d L \u0026lt;\u003d 100000)."}},{"title":"Output","value":{"format":"HTML","content":"Output file must contain two integers, N and D, separated by space."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3.14159265358979\r\n10000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e355 113\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}