defmodule Main do def main do 1..2 |> Enum.map(fn _ -> IO.read(:line) |> String.trim |> String.split |> Enum.map(&String.to_integer/1) end) |> solve |> IO.puts end def solve([[xa, ya], [xb, yb]]) do (xa * yb + xb * ya) / (xa + xb) end end