(a:r)%0=r;(a:r)%n=a:r%(n-1) d[]=1;d(f:r)=foldr(\(j,x)->(x*d(map(%j)r)-))0$zip[0..]f main=interact$show.d.map(map read.words).lines