#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
Volume0-0003
1 2 3 4 5 6
2 -1 -2 -1 -1 -5
2 -1 -3 1 -1 -3
2 -1 -3 -9 9 27
=end
def rnd(x)
  return (x * 1000).round.to_f / 1000
end

def sim(v)
  a,b,c,d,e,f = v
  det = a*e - b*d
  x = ( e*c - b*f)/det
  y = (-c*d + a*f)/det
  return [x,y]
end

class Main
  def initialize
    fh=STDIN
    v = []
    while fh.gets do
      v.push($_.split.map{|x| x.to_i})
    end
    v.each{|f|
      x,y = sim(f)
      printf("%.3f %.3f\n", rnd(x), rnd(y))
    }

  end

end

if $0 == __FILE__ then
  Main.new
end