program main implicit none real*8::xa,ya,xb,yb read *,xa,ya,xb,yb print '(f0.10)', ya - xa*(ya-yb)/(xa+xb) end program main