#include<stdio.h>
int main(){int a,b,c,d,e,f;while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=-1){double x,y; y=(double)(a*f-d*c)/(a*e-b*d);x=(double)(c-b*y)/a;printf("%.3f %.3f\n",x+0.0005,y+0.0005);}return 0;}