The condition for uniqueness of solutions of the Dirichlet problem for the wave equation in coordinate rectangles