#00012B

z-capacitors2

An old professor is checking Little Z's homework (remember z-capacitors task). Since little Z failed to make the mesh and was using a wrong formula for serial connected capacitors, professor decide that little Z can pass through this situation only if he recompute total capacitance of mesh between points A and B in the form of irreducible rational number. Further, all capacitors remain same but their value can be an integer [] farads instead of only one farad. Little Z is planning to graduate in physics, so this time he can not allow any mistakes.


On the image you can see his unfinished homework configuration for N = 5


Image: kondenzatori

You probably know this from high school physics, but anyways: two capacitors in serial connection have 1/C<sub>tot</sub> = 1/C<sub>1</sub> + 1/C<sub>2</sub> and two capacitors in parallel connection have C<sub>tot</sub> = C<sub>1</sub> + C<sub>2</sub>.


Image: veze

InputFrom the standard input read two blank space separated integers N, 1 < N < 20, mesh dimension and C, 1 <= C <= 100, capacitance of every capacitor.

OutputTo the standard output write two integers p and q separated by "/", representing an irreducible rational number which represents the total capacitance between points A and B ( 0 < p, q < 2<sup>63</sup>). Also at the end of the line write an endl character.

Input:
[c]5 1

Output:
34/73

Input:
6 66
Output:
4598/167

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.