#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
       
       
template <typename T>
class Matrix {
  vector<vector<T>> A;

 public:
  Matrix(size_t n, size_t m, T v = 0) : A(n, vector<T>(m, v)){};
  Matrix(initializer_list<initializer_list<T>> B) : A(B.begin(), B.end()){};

  size_t height() const { return A.size(); }

  size_t width() const { return A[0].size(); }

  inline const vector<T> &operator[](int k) const { return A[k]; }
  inline vector<T> &operator[](int k) { return A[k]; }

  static Matrix I(size_t n) {
    Matrix m(n, n, 0);
    for (int i = 0; i < n; ++i) m[i][i] = 1;
    return m;
  }

  Matrix &operator+=(const Matrix &B) {
    size_t n = height(), m = width();
    assert(n == B.height() && m == B.width());
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        (*this)[i][j] += B[i][j];
      }
    }
    return (*this);
  }

  Matrix &operator-=(const Matrix &B) {
    size_t n = height(), m = width();
    assert(n == B.height() && m == B.width());
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        (*this)[i][j] -= B[i][j];
      }
    }
    return (*this);
  }

  Matrix &operator*=(const Matrix &B) {
    size_t n = height(), l = width(), m = B.width();
    assert(l == B.height());
    vector<vector<T>> C(n, vector<T>(m, 0));
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        for (int k = 0; k < l; ++k) {
          C[i][j] += (*this)[i][k] * B[k][j];
        }
      }
    }
    A.swap(C);
    return (*this);
  }

  Matrix operator+(const Matrix &B) const { return (Matrix(*this) += B); }

  Matrix operator-(const Matrix &B) const { return (Matrix(*this) -= B); }

  Matrix operator*(const Matrix &B) const { return (Matrix(*this) *= B); }

  Matrix power(long long r) const {
    assert(height() == width());
    Matrix A(*this), B(Matrix::I(height()));
    while (r > 0) {
      if (r & 1) B *= A;
      A *= A;
      r >>= 1;
    }
    return B;
  }

  friend ostream &operator<<(ostream &os, const Matrix &A) {
    size_t n = A.height(), m = A.width();
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        if (j != 0) os << " ";
        os << A[i][j];
      }
      os << endl;
    }
    return os;
  }

  friend istream &operator>>(istream &is, Matrix &A) {
    size_t n = A.height(), m = A.width();
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        is >> A[i][j];
      }
    }
    return is;
  }
};
       
class GaussJordan {
  int _rank;
  Matrix<double> D;

  bool isZero(double v) { return abs(v) < 1e-10; }

 public:
  GaussJordan(const Matrix<double>& A, bool extended = false) : D(A), _rank(0) {
    int H = D.height(), W = D.width();
    for (int col = 0; col < W; ++col) {
      if (extended && col == W - 1) break;
      int pivot = -1;
      for (int row = _rank; row < H; ++row) {
        if (!isZero(D[row][col])) {
          pivot = row;
          break;
        }
      }
      if (pivot == -1) continue;
      swap(D[pivot], D[_rank]);

      for (int col2 = W - 1; col2 >= col; --col2)
        D[_rank][col2] /= D[_rank][col];

      for (int row = 0; row < H; ++row) {
        if (row != _rank && !isZero(D[row][col])) {
          auto r = D[row][col];
          for (int col2 = 0; col2 < W; ++col2) {
            D[row][col2] -= D[_rank][col2] * r;
          }
        }
      }
      ++_rank;
    }
  }

  inline const auto& operator[](int row) const { return D[row]; }
  int rank() { return _rank; }
};
template <typename T>
class LinearEquation {
  vector<T> _ans;
  bool _solvable;

 public:
  LinearEquation(Matrix<T> A, vector<T> b) {
    int m = A.height(), n = A.width();
    Matrix<T> M(m, n + 1);
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < n; ++j) M[i][j] = A[i][j];
      M[i][n] = b[i];
    }

    GaussJordan C(M, true);

    _solvable = true;
    for (int row = C.rank(); row < m; ++row) {
      if (C[row][n]) _solvable = false;
    }

    _ans.resize(n, 0);
    for (int i = 0; i < C.rank(); ++i) _ans[i] = C[i][n];
  }

  bool solvable() { return _solvable; }

  T operator[](int i) const { return _ans[i]; }
};

int main() {
  Matrix<double> A(2, 2);
  vector<double> b(2);

  while (true) {
    for (int i = 0; i < (int)2; ++i) {
      for (int j = 0; j < (int)2; ++j) cin >> A[i][j];
      cin >> b[i];
    }
    if (cin.eof()) break;
    LinearEquation<double> le(A, b);
    printf("%.3lf %.3lf\n", le[0], le[1]);
  }

  return 0;
}



Measured memory_bytes: 3224