QOJ.ac

QOJ

시간 제한: 1 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓

#18695. Mathematics is non-face-to-face lecture

통계

Suhyeon is a middle school student living in the era of the Fourth Industrial Revolution. Due to COVID-19, Suhyeon is attending virtual school and listening to virtual lectures. Suhyeon's virtual teacher gave a lecture on how to solve a system of linear equations with two variables and assigned the following problem as homework.

Calculate the values of $x$ and $y$ for the following system of linear equations:

$$ \begin{cases} ax + by = c \\ dx + ey = f \end{cases} $$

Thinking that going to meet virtual friends is more valuable than sitting around doing homework in the era of the Fourth Industrial Revolution, Suhyeon did not have time to solve these equations. Fortunately, submitting homework for the virtual lecture involves entering numbers into blank spaces in an internet window. Each space can only accept integers between $-999$ and $999$. Let's help Suhyeon leave for the virtual world to meet virtual friends.

Input

The integers $a, b, c, d, e, f$ are given in order, separated by spaces ($-999 \le a, b, c, d, e, f \le 999$).

It is guaranteed that the input is given only when there exists a unique solution $(x, y)$ for the equations mentioned in the problem, and both $x$ and $y$ are integers between $-999$ and $999$.

Output

Output the values of $x$ and $y$, which are the answers to the problem, separated by a space.

Examples

Input 1

1 3 -1 4 1 7

Output 1

2 -1

Input 2

2 5 8 3 -4 -11

Output 2

-1 2

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.