Check if the solutions are correct