by@akouryy1
AC
679ms
JS{{{var p,q,s=0,z=9,a=require('fs').readFileSync('/dev/stdin','utf8').split(/\s/) for(;z--;s-=z<3&&a[z]*(a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3]))a[z]-=a[9+z%3] console.log(s/6)}}}
39 08 30 04 08 78 20 67 64 11 55 16
20212