IIUC HexWorld

Alice and Bob reside in Independent Impeccable United Countries (IIUC) a land of the free. There, all the houses are placed in a hexagonal grid. The kings palace is num- bered 0 and all others are numbered 1, 2, 3 . . . spirally keep- ing the kings palace at the center. There is a single street, starting at kings palace and built like a spiral, touching the houses 1, 2, 3 . . . sequentially. The picture on the right shows the first few houses and the street in heavy dark line. Alice lives in house A and Bob lived in house B. When Alice wants to visit Bob, since she is afraid of the dark, she sticks to the road. When Bob wants to visit Alice, he walks straight to Alices home. Input On each line, there will be a pair of integers, A and B. Output For each line of input, print the distance covered by Alice and Bob respectively, with three digits after decimal point. Constraints • 0≤A,B≤107 Sample Input 12 13 14 17 18 19 Sample Output 1.000 1.000 2.000 1.732 3.000 2.000 6.000 1.000 7.000 1.000 8.000 1.000