#include<iostream>
#include <iomanip>
using namespace std;

int main(){
    double a[100]={0};
    double b[100]={0};
    double c[100]={0};
    double d[100]={0};
    double e[100]={0};
    double f[100]={0};
    int i=0;
    while(cin>>a[i]>>b[i]>>c[i]>>d[i]>>e[i]>>f[i]){
        i++;
        }
    for(int j=0;j<i;j++){
        float x=(b[j]*f[j]-e[j]*c[j])/(b[j]*d[j]-a[j]*e[j]);
        float y=(a[j]*f[j]-c[j]*d[j])/(a[j]*e[j]-b[j]*d[j]);
        cout<<setiosflags(ios::fixed)<<setprecision(3)<<x<<" "<<y<<endl;
        }
    
    return 0;
}