Three Origami Squares

Cut three equal axis-aligned squares from an h by w sheet and print the largest possible side length.

Easy2GeometryMathNo attempts yetTime limit2sMemory limit256 MB

Problem

Alex likes origami. Almost every origami model starts from a single square sheet of paper.

Alex is making a present for his mother. The model needs three squares of the same size, but Alex has only one rectangular sheet. He can cut squares out of that sheet, and the sides of every square he cuts must be parallel to the sides of the sheet.

Find the largest possible side length of the squares, given that all three of them must be cut from the sheet.

Input

The first line contains two integers hh and ww, the height and the width of the sheet. (1h,w10001 \le h, w \le 1000)

Output

Print the largest possible side length of the squares on the first line.

Round the value to six digits after the decimal point and pad missing digits with zeros. For example, print 105.000000 when the answer is 105105, and 0.500000 when the answer is 12\frac{1}{2}.

Hint

Three squares of side 105 cut from a sheet of height 210 and width 297

On a sheet of height 210210 and width 297297, three squares of side 105105 fit as shown above.

Three squares stacked in one column on a sheet of height 250 and width 100

On a sheet of height 250250 and width 100100, three squares of side 2503\frac{250}{3} are stacked in a single column.