# Strange Optimization

Bobo is facing a strange optimization problem. Given n,m, he is going to find a real number α such that f(12+α) is maximized, where f(t)=mini,jZ|injm+t|. Help him!

Note: It can be proved that the result is always rational.

## Input

The input contains zero or more test cases and is terminated by end-of-file.

Each test case contains two integers n,m.

• 1n,m109
• The number of tests cases does not exceed 104.

## Output

For each case, output a fraction p/q which denotes the result.

## Sample Input

1 1
1 2


## Sample Output

1/2
1/4


## Note

For the first sample, α=0 maximizes the function.

### Source

XTU OnlineJudge
#include<stdio.h>

#define ll __int64
ll gcd(ll a,ll b)
{
return a%b==0?b:gcd(b,a%b);
}

int main()
{
ll a,b;
while(~scanf("%I64d %I64d",&a,&b))
{
printf("1/%I64d\n",2*a*b/gcd(a,b));
}
return 0;
}


#### 2016年湘潭地区邀请赛总结

2016-06-06 22:15:01

#### 2016湘潭邀请赛 xtu1250

2017-03-02 22:23:38

#### 2017年“嘉杰信息杯” 中国大学生程序设计竞赛全国邀请赛:I— Strange Optimization

2017-05-16 13:08:40

#### 2018年湘潭大学程序设计竞赛——C Boom

2018-04-27 08:22:12

#### 2017CCPC中南地区赛暨湘潭大学邀请赛总结

2017-05-17 18:39:01

#### HDU 6284 CCPC 2018 湘潭邀请赛

2018-07-06 01:40:46

#### 2018 湘潭邀请赛 部分题解

2018-05-14 15:32:08

#### 2018年湘潭大学程序设计竞赛——B String

2018-04-27 08:16:03

#### Xiangtan Invitation Contest 2017（2017湘潭邀请赛）（Done）

2017-05-29 00:00:06

#### 2018 湘潭邀请赛 K.2018

2018-05-14 20:22:09