package Yukicoder /** * Created by hichikawa on 2015/11/12. */ fun main(args: Array) { fun readLineIntArray() : List { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toInt() } return ret } val pointX = readLineIntArray() val pointY = readLineIntArray() // println(pointX[0] + (pointY[1] - pointX[1])*pointX[1]/pointY[1].toDouble()) println(pointX[1] + (pointY[1] - pointX[1])*pointX[0]/(pointX[0]+pointY[0]).toDouble()) }