ICS Contest 1 Problem 4 - An MTH1W problem

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Given two lines, with equations y=Ax+B, and y=Cx+D, determine the point of intersection.

Constraints

-100 \leq A,B,C,D \leq 100

Input Specfication

The first line will contain space-separated integers A,B,C,D.

Output Specification

If the point of intersection does not exist, output no POI. If there is more than one point of intersection, output multiple POIs. Otherwise, output the x-coordinate of the point of intersection, followed by the y-coordinate. It is guaranteed the coordinates are integers.

Sample Input

1 0 2 3

Sample Output

-3 -3

Comments

There are no comments at the moment.