/*
  Name : Dipu Kumar Mohanto
  Problem : C
  BRUR Weekend Practice Contest on May 19, 16
*/
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <set>

#define SET(a) memset(a, -1, sizeof(a));   /// When dp[] & use for blank all position
#define CLR(a) memset(a, 0, sizeof(a));     /// When dp[] & use for NULL or 0 all position
#define MEM(x,y) memset(x,y,sizeof(x));  /// When dp[][] & use for blank all position
#define maxall(v) *max_element(v.begin(),v.end());  /// Find maximum value from the vector
#define minall(v) *min_element(v.begin(),v.end());   /// Find minimum value from the vector
#define Sort(v) sort(v.begin(),v.end());     /// Sort the vector
#define un(v) Sort(v), v.erase(unique(v.begin(),v.end()),v.end());   /// Erase duplicate value from the vector
#define max3(a,b,c) max(a,max(b,c));    /// Find maximum value among 3 values
#define min3(a,b,c) min(a,min(b,c));        /// Find minimum value among 3 values
#define TFtoL(a) transform(a.begin(), a.end(), a.begin(), :: tolower) /// Convert the uppercase letter to lowercase in C++
#define TFtoU(a) transform(a.begin(), a.end(), a.begin(), :: toupper)
#define ull unsigned long long
#define PI 2*acos(0.0)

bool cmp(int a, int b){
     return a>b; }
int comp(void const *a, void const *b)  ///  Function for qsort $$ qsort(Name, Size, sizeof(int), comp);
{
    int *p, *q;
    p = (int *) a;
    q = (int *) b;
    return (*p - *q);
}
const int N = 3e5+2;
const int INF=0x7FFFFFFF;    /// Heighest value of int

using namespace std;

int main()
{
    double a, b, c, d, e, f, x, y;

    while(cin >> a >> b >> c >> d >>  e >> f){
        x = (b*f - c*e) / (b*d - a*e);
        y = (a*f - c*d) / (a*e - b*d);

        printf("%.3lf %.3lf\n", x, y);
    }

    return 0;
}