fun gcd(a: Long, b: Long) : Long{ return if(b == 0L) a else gcd(b, a%b) } fun power(n: Int) : Long{ var ret = 1L repeat(n){ ret *= 10 } return ret } fun main(){ val x = readLine()!! var s = x.replace(".","").toLong() var b = if(x.contains(".")) power(x.length-x.indexOf('.')-1) else 1 val p = gcd(s, b) s /= p b /= p println("%d/%d".format(s, b)) }