God Huang is good at study, and he is very likely to get better grades than his poor roomate cyt. In a singe test, God Huang has equal probability to get grades betweeen 1 and A, while poor cyt has equal probability to get grades between 1 and B. God Huang will get some pleasure points if he's score is a multiple of cyt's, and the pleasure points he will get is the square of cyt's points. For example if God Huang got 100 grades and cyt got 50 than he will get pleasure points of 50 × 50. Your task now is to calculate the expect pleasure points God Huang will get.
1170: Orz God Huang时间限制: 2 Sec 内存限制: 128 MB
提交: 116 解决: 28
The input contains multiple test cases(About 10000 test cases). Each case contains two integers A and B (1 <= B < = A <= 1 000 000) in a line.
The input is terminated by n = m = 0.
For each test case, output the expect pleasure point God Huang will get as a reduced fraction (i.e., the greatest common divisor of the numerator and denominator is 1). If the answer is zero (one), you should output 0/1 (1/1) instead)
1 1 2 2 8 4 0 0
1/1 3/2 37/16
Notice that if cyt and God Huang get same score, God Huang will still get pleasure points.