import java.io.*; import java.util.*; // https://yukicoder.me/problems/no/1141 public class A_SimultaneousEquations { private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); private static StringTokenizer st; private static int readInt() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return Integer.parseInt(st.nextToken()); } public static void main(String[] args) throws IOException { solve(); pw.close(); } private static void solve() throws IOException { double a = readInt(); double b = readInt(); double c = readInt(); double d = readInt(); double e = readInt(); double f = readInt(); double x = (c * e - f * b) / (a * e - d * b); double y = (-c * d + f * a) / (a * e - d * b); pw.println(x + " " + y); } }