p01012 Planarian Regeneration
Notes

For this problem, it is recommended to use floating point numbers, which are more accurate than double.



Input


m n x
k l y


For input, six integers m, n, x, k, l, y are given in the above input format.
These six integers correspond to those in the problem statement, repeating the horizontal m: n cut x times and the vertical k: l cut y times.
1 ≤ m, n, k, l ≤ 100, 0 ≤ x, y ≤ 40, and m, n and l, k are relatively prime.

Output

Print out the expected number of planarians that are regenerating to their original form after a few weeks in a row.
The output is acceptable with an error of 10-6 or less.

Examples

Input

1 1 1
1 1 1


Output

0.562500


Input

1 2 2
1 1 1


Output

0.490741


Input

1 2 0
3 4 0


Output

1.000000
```python
m,n,x=[int(i) for i in input().split()]
k,l,y=[int(i) for i in input().split()]

res=0.5*(1.0+((m**2+n**2)**x)/((m+n)**(2*x)))
res*=0.5*(1.0+((k**2+l**2)**y)/((k+l)**(2*y)))
print(res)


```