Problem: 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

Solution (in CPP):

Solution:
#include "bits/stdc++.h"
using namespace std;
using ld = long double;
const ld eps = 1e-7;

ld getans(ld l,ld r, int b,ld c) {
	if (b == 0||abs(r-l)<eps) {
		return (1-l)*(r - l);
	}
	ld aa = getans(l,(1-c)*l+c*r, b - 1, c);
	ld ab = getans((1 - c)*l + c*r,r, b - 1, c);
	return aa + ab;
}

ld get() {
	int m, n, x; cin >> m >> n >> x;
	ld c = (ld(m)) / (m + n);
	return getans(0,1, x, c);
}

int main() {
	cout << setprecision(10) << fixed << get()*get() << endl;
	return 0;
}