System.in.eachLine{(a,b)=(it=~/\d+/)*.toLong() int x=a/(d=(a+0g).gcd(b)) println"$x/"+(x=b/d)-~'/1$'}