#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int a,b,c,d,e,f;
  double x,y;
  while(cin>>a>>b>>c>>d>>e>>f)
    {
      x=1.0*(c*e-b*f)/(a*e-b*d)+0.0001;
	y=(c-a*x)/b+0.0001;
	printf("%.3f %.3f\n",x,y);
    }}