sub solve{ my( $a, $b, $c, $d ) = @_; my $x = ($b - $a) / ($d - $a - $c + $b); my $y = ($d - $a) * $x + $a; return( $x, $y ); }