Cayley-Menger determinant for coplanarity