x1,y1 = gets.split.map &:to_f x2,y2 = gets.split.map &:to_f puts y1 + (y2-y1)*(x1)/(x1+x2)