Math Is an Online Lecture
InterviewTime limit1sMemory limit1024 MB
Given six integers defining two linear equations in two unknowns, solve the system and print the integer values of x and y.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Suhyeon is a middle school student living in the era of the Fourth Industrial Revolution. Because of COVID-19, Suhyeon attends a virtual school virtually and takes virtual lectures. Suhyeon's virtual teacher gives a lecture on how to solve a system of two equations with two unknowns and assigns the following problem as homework.
Compute the values of and in the following system of equations.
[\begin{cases}ax+by=c\dx+ey=f\end{cases}]
Suhyeon, who thought that in the era of the Fourth Industrial Revolution going to meet virtual friends is more worthwhile than sitting around doing homework, had no time to solve such a system of equations. Fortunately, homework submission for the virtual lecture works by typing numbers into blank boxes in a web page. Each box accepts only an integer between and . Help Suhyeon leave for the virtual world to meet virtual friends.
Input
The integers , , , , , are given in order, separated by spaces. ()
It is guaranteed that the input is given only when there is a unique satisfying the equations mentioned in the problem, and and are each integers between and .
Output
Print and , the answers to the problem, separated by a space.