def ascan; gets.split.map(&:to_f);end x1,y1 = ascan x2,y2 = ascan p y1 + (y2-y1)*x1/(x1+x2)