In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you are familiar with IRC chat, the support team is also reachable on PIRC network (irc.pirc.pl
) in #szkopul
channel. If you are not, just use email.
Please do not ask us things like "how to solve task XYZ?".
Please remember that the support team has to sleep sometimes or go to work in real life.
We are given six integers: ,
,
,
,
,
such that
.
These numbers are coefficients in equations of two intersecting lines:
Write a program which:
The first line of the standard input contains three numbers
, separated by single spaces -
the coefficients of
's equation.
The second line contains three numbers
, separated by single spaces -
the coefficients of
's equation.
It is true that
.
The third and last line contains two integers
,
separated by a single space. They are the coordinates of a point
representing one part of plane.
Point
does not belong to any of lines
,
.
For every number
from the input it is true that
.
Your program should write to the standard output two numbers
, separated by a single space - the coordinates of a point
representing the given part, closest to the point of
intersection of lines
and
.
If there are many such points, your program should output only
one of them.
For the input data:
1 -1 1 2 -3 1 5 4
the correct result is:
2 2
Task author: Jakub Pawlewicz.