ZCC Loves Intersection

Time Limit: 1000ms
Memory Limit: 131072KB
This problem will be judged on HDU. Original ID: 4873
64-bit integer IO format: %I64d      Java class name: Main

Description

After beats all opponents in 3-dimension-world OI, ZCC feels bored and sets about going to other universes. In a universe with D dimension(s), ZCC finds D segments floating in the air. To be more precise: if we build a rectangular coordinate system with D axis, each of the segments is parallel with one axis, whose endpoints have a coordination of which all components belong to the set {x∈Z|0≤x<N}. For each axis, there is exactly one segment parallel with it.
Each of the D segments changes location every second. Read the pseudo code below for more details:

Every second, from every pair of segments intersect, ZCC acquires a unit of Energy. Calculate the Expectation of the amount of the acquired energy per second please.

Input

There are several test cases in one input file. EOF indicates the end of input file.
Every test case contain two positive numbers N, D in one line.
It is guaranteed that 1<N≤10^9, D≤99. The number of test cases≤10.

Output

For each test case, output a line with an integer or an irreducible fraction p/q, which is the Expectation.

Sample Input

2 2
3 3
5 5

Sample Output

1
49/81
18/625

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .