import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner First = new Scanner(System.in);
double a = First.nextDouble();
double b = First.nextDouble();
double c = First.nextDouble();
double d = First.nextDouble();
double e = First.nextDouble();
double f = First.nextDouble();
double cramer = ((a*d) - (b*c));
double x = ((e*d - b*f)) / cramer;
double y = ((a*f - e*c)) / cramer;
if (cramer == 0){
System.out.printf("no solution");}
if (!(cramer == 0)){
if (x>y){
System.out.printf("%d ",(int)(x));
System.out.printf("%d", (int)(y));
}
else
System.out.printf("%d ",(int)(y));
System.out.printf("%d", (int)(x));
return;
}
}
}