Dynamical cubes and a criteria for systems having products extensions