12873 - Simultaneous equations   

Description

Given two simultaneous equations: 

Please write a program to solve x and y using Cramer's rule.

For more details about Cramer's rule, please refer to the following formulas:

,      

The determinant of 2x2 can be calculated as:

Input

The input contains six integer coefficients: a, b, c, d, e, f, separated by spaces.

-1000 < a, b, d, e < 1000 , -1000000 < c, f < 1000000

 

 

Output

Print out the answer of x and y, separated by a space, you don't have to add a newline at the end. We guarantee that there are exactly one solution for each testcase, and the solution will be integer.

Sample Input  Download

Sample Output  Download

Tags




Discuss