System.in.eachLine{{x,y->g=(x*1g).gcd(y) x=x/g+0 println y>g?"$x/${y/g+0}":x}it.split('/')*.toLong()}