Generating Problems from Problems and Solutions from Solutions