using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Numerics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using static System.Math;class Program { static void Main(string[] args) { //var exStdIn = new System.IO.StreamReader( "stdin.txt" );System.Console.SetIn( exStdIn ); //const long inf = 100000000000000; var abc = Console.ReadLine().Split().Select(double.Parse).ToArray(); double a = abc[0], b = abc[1], c = abc[2], d = abc[3], e = abc[4], f = abc[5]; b*=d;c*=d; e*=a;f*=a; double y; if(b-e==0) y = 0; else y = (c-f)/(b-e); double x = (c-b*y)/(a*d); Console.Write(x); Console.Write(' '); Console.WriteLine(y); } }