You need to copy an $A \times B$ mm image onto a $C \times D$ mm sheet of paper, keeping the image as large as possible.
You may rotate the image by 90 degrees (landscape orientation). If it still does not fit, you may shrink it uniformly to an integer percentage of its original size.
For example, to copy a 560×400 mm image onto a 216×280 mm sheet, you can rotate it to landscape and reduce it to 50% of its original size, giving 200×280 mm, which fits without overlapping any edge.
Given the image and paper dimensions, determine the largest integer percentage of the original size at which the image still fits on the paper (after an optional 90° rotation).
The input contains one or more test cases. Each test case is a single line with four positive integers $A$, $B$, $C$, and $D$ separated by spaces, describing an $A \times B$ mm image and a $C \times D$ mm sheet of paper. Every value is less than 1000.
The input ends with a line containing four zeros, which must not be processed.
For each test case, print the largest integer percentage $p$ (with $1 \le p \le 100$) such that the image, scaled to $p%$ of its original size and optionally rotated 90°, fits on the paper without overlapping any edge. If the image already fits at its original size, print 100%.
It is guaranteed that the answer is always an integer percentage between 1% and 100% inclusive. Print each answer on its own line, followed by a percent sign, exactly as shown in the examples.