#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>

#define doubled( x ) (x * x)

//?????????????¨????(2 * 2??£?????????)
int matrix_val(int a11, int a12, int a21, int a22);

//?????°?????°?????? (in:??´??° out:?????°)
int digit_count(int num);

using namespace std;

int main()
{
	int a, b, c, d, e, f;
	
	while(1)
	{
		cin >> a >> b >> c ;
		cin >> d >> e >> f ;
		
		int ans_x = matrix_val(c, b, f, e) / matrix_val(a, b, d, e);
		int ans_y = matrix_val(a, c, d, f) / matrix_val(a, b, d, e);
		
		cout << ans_x << ans_y << endl;
	}
	return 0;
}

int matrix_val(
int a11, int a12,
int a21, int a22
){
	return ((a11 * a22) - (a12 * a21));
}

int digit_count(int num)
{
	if( num < 0 )num *= (-1);
	
	int count = 0;
	
	for(int i = 10; num != 0; i *= 10)
	{
		int diff = num % i;
		num -= diff;
		count++;
	}
		
	return count;
}