x=[] for n in 0..3 x[n]= gets.split.map(&:to_i).push(1) end p -Matrix.rows(x).det/6