FINFRAC - Finding Fractions

Given a,b,c,d, find a fraction p/q with minimum q, and satisfied a/b < p/q < c/d .

Input

For each test case, one line contains four integers a,b,c,d .

Output

For each test case, print the fraction(see the sample for details).If multiple solution exists, output the one with minimum p.

Example

Input:
1 3 1 2
2 1 3 1
2 1 4 1
1000 1001 1001 1002

Output:
2/5
5/2
3/1
2001/2003

Constraints

Dataset 1: a,b,c,d ( 1 <= a,b,c,d <= 1e9, and a/b < c/d )


Được gửi lên bởi:Race with time
Ngày:2009-02-19
Thời gian chạy:3s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:Tất cả ngoại trừ: ERL GOSU JS-RHINO NODEJS PERL6 PYPY RUST SED VB.NET
Nguồn bài:Code Craft 09

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.