A bicycle has 3 chain rings on the crank (the gears attached to the pedals) at the front and 7 gears on the back wheel. The chain connects exactly one front chain ring to one back gear, and the derailleurs can switch the chain to any combination of the 3 front chain rings and 7 back gears, giving 3×7=21 possible combinations.
The ease of pedalling is determined by the ratio of the number of teeth on the chosen chain ring to the number of teeth on the chosen back gear. The smaller this ratio, the easier it is to pedal. Given the number of teeth on each gear, write a program that reports the gear ratio for every combination.
The input consists of two lines.
You may assume that every gear ratio is less than 10.
Print 21 lines. Each line describes one combination and has the form
x.xx f b
f is the chain ring number (1≤f≤3),b is the back gear number (1≤b≤7),x.xx is (teeth on chain ring f) / (teeth on back gear b) rounded to two decimal places.The three fields are separated by single spaces. Print the lines from smallest ratio to largest; if two or more ratios are equal, print the one with the smaller chain ring number first.