-- Who goes there? -- asked Fao (in the jungle, this question is always asked after the sound of a trumpet). -- Dholes, dholes, the Deccan dholes! The red dogs! They come from the south, saying there is no game in the Deccan.
Before entering the Seeonee valley, the pack of hungry red dogs arranged themselves in a rectangular battle formation of N \times M dogs. With wild barking and loud howling, they greeted their leader. However, the leader was not impressed by such a cacophony; he had his own ideas on how he should be greeted.
Using his authority, he can issue a command any number of times to make the dogs in any subrectangle of the battle formation of size K \times L (where the vertical side length is and the horizontal side length is ) switch from howling to barking, and from barking to howling.
Is it possible for him to achieve a harmonious greeting from his pack?
The first line of the input file contains the numbers , , , (1 \leq N, M, K, L \leq 100,\ K \leq N,\ L \leq M).
In the next lines, there are numbers, where means the dog is barking, and means the dog is howling. These lines represent the initial cacophony. In the following lines, the desired harmonious greeting is recorded in the same format.
The output file should contain the smallest number of commands the leader needs to give to achieve the harmonious greeting, or if such a set of commands does not exist.
Example 1