#include <cstdio>
    #include <iostream>
    using namespace std;
     
    int main() {
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
    if(a==0){
    y=(c+0.0000001)/b;
    x=(f-e*y+0.0000000001)/d;
    }
    else{
    y=(a*f-d*c+0.00000000000001)/(a*e-d*b);
    x=(c-b*y+0.0000000001)/a;
    }
    printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
    }