Y=`dd`.split;i=2;a,b,c,d,e,f,g,h,i=Y.map{|e|i+=1;e.to_i-Y[i%3].to_i}[3,9];p (a*e*i+b*f*g+c*d*h-a*h*f-b*i*d-c*g*e)/6