class Start def main a, b = 2.times.map { input.split.map { |it| it.to_i } } solve(a, b) nil end private def solve(a, b) res = 0 res += a[1] * b[0] res += a[0] * b[1] res /= (a[0] + b[0]).to_f echo res.round(6) end protected def echo(*x) print(*x) puts end def input = gets.chomp end Start.new.main