#include<iostream>
#include<iomanip>

using namespace std;

int main(){
	int a, b, c, a2, b2, c2;
	int i, j;

	while(cin >> a >> b >> c >> a2 >> b2 >>c2){
		for(i = -1000; i <= 1000; i++){
			for(j = -1000; i <= 1000; i++){
				if(a*i + b*j == c && a2*i + b2*j == c2){
					cout << fixed << setprecision(3)  << i << " " << j << endl;
				}
			}
		}
	}
}