($a,$b,$c,$d)=/\d+/g for<>.<>; print $b+($d-$b)*$a/($c+$a)