Sir Bedavere reasons in odd ways and still arrives at the right answer often enough. This time he took on division. He concluded that erasing one shared digit from the numerator and the denominator leaves the value of the fraction unchanged. He only tried it on a few three digit numbers.
664166=6416
He erased the 6 at the right end of 166 and the 6 at the left end of 664. Both fractions equal 0.25.
Find every fraction whose numerator and denominator are both three digit numbers and that has this property: the rightmost digit of the numerator equals the leftmost digit of the denominator, and erasing those two digits leaves the value of the fraction unchanged.
Skip the trivial cases of the form xxx/xxx = xx/xx. 222/222 = 22/22 is one of them.
The first line has two integers L and R separated by a space. (100≤L≤R≤999)
Print every bogus division whose numerator is between L and R inclusive, one to a line, in increasing order of the numerator. Each line has the form a / b = c / d, where a and b are the original numerator and denominator and c and d are the numerator and denominator after the two digits are erased. Single spaces separate the non-blank characters. Print nothing when no fraction qualifies.