Program Pasager;
var d, d1, d2, s, s1, s2: real;
begin
write ('s1='); readln (s1);
write ('s2='); readln (s2);
write ('s='); readln (s);
write ('d='); readln (d);
d1:=(s2*d-s)/(s2-s1);
d2:=d-d1;
writeln ('Pasagerul s/a deplasat ', d1, ' km cu primul vehicul si ', d2, ' km cu al doilea vehicul.');
readln;
end.