n,*a=$<.read.split.map &:to_r $><<(a.shift(n).reduce(:/)*a[1..-1].reverse.reduce(:/)).to_s.tr('/',' ')