beecrowd | 2573

Treasure Hunt

By Dilson Guimarães, UFMG BR Brasil

Timelimit: 1

Luan and Larissa are twin brothers who love to play in the pool. Their favorite game is treasure hunt. In this game, both find themselves inside the pool when their father tosses a coin into the pool in a randomly chosen position with even probability. As Larissa and Luan are twins who love to swim, they both can swim at the same speed. Therefore, the one nearest the place where the coin falls will be the first to pick it up.

Matthew is the younger brother of Luan and Larissa. He is not much of sports. He prefers to stay at the kiosk drinking lemonade and solving a Sudoku. But, observant as it is, Matthew realized that the result of the brothers' play is determined by luck. Now, he wants to know how much each brother has to get the coin. Matthew is very busy solving your Sudoku. So he asked you to calculate this probability for him based on the size of the pool and the position of each of the siblings.

The pool is described as a rectangle whose lower left corner is at the point (0, 0) and the upper right corner is at the point (L, A). The position of Luan is described by the point (XA, YA), and the position of Larissa by the point (XB, YB).

Input

The entrance is composed of three lines. The first contains two integers L (1 ≤L ≤104) and A (1 ≤A ≤104), the coordinates of the upper right corner of the pool. The second contains two integers XA (0 ≤XAL) and YA (0 ≤YAA), the coordinates of Luan inside the pool. The third contains two integers XB (0 ≤XBL) and YB (0 ≤YBA), the coordinates of Larissa inside the pool.

Output

The output should contain a line with two numbers with 6 decimal places divided by space, representing the probability of Luan picking up the coin and the likelihood of Larissa picking up the coin.

Input Samples Output Samples

2 4
1 0
1 4

0.500000 0.500000

4 7
2 1
2 3

0.285714 0.714286