#include <cstdio>

using namespace std;

double cross(double a, double b, double c, double d)
{
  return a * d - b * c;
}

int main()
{
  double a[3], b[3];
  while (scanf(" %lf %lf %lf %lf %lf %lf ", &a[0],&a[1],&a[2],&b[0],&b[1],&b[2]) == 6) {
    printf("%.3lf %.3lf\n", cross(a[2], a[1], b[2], b[1]) / cross(a[0], a[1], b[0], b[1]), cross(a[0], a[2], b[0], b[2]) / cross(a[0], a[1], b[0], b[1]));
  }
  return 0;
}