Gradually, before Mowgli, a cobra emerged, larger than any he had ever seen. This snake, nearly eight feet long, had turned as white as ivory from being in constant darkness. Even the round mark on its swollen neck had faded to a pale yellow. The cobra's eyes were red, like rubies, and the entire creature appeared both strange and wondrous.
This is what the white cobra said to Mowgli:
– I am the guardian of the royal treasure. Kurun Raja built a stone structure above me back when my skin was dark, and I could bring death to those who came here to steal. Through the stones, they lowered the treasure, and I heard the chants of the Brahmins, my masters.

The Brahmins constructed the vault as a rectangle of N \times M square rooms. Upon entering the vault, you find yourself in a room labeled S(s_x, s_y) on the plan, and you can only exit to the light through the room F(f_x, f_y). You need to know a secret that will save you from certain death after encountering Tuu. In each room, there are Upanishads—ancient Indian treatises. The Upanishads primarily describe the impersonal aspect of the Absolute Truth and also specify how many coins can be taken from that room. In room , you can take bags to store the gold. When passing through a room, you must place in the bag exactly the number of gold coins indicated in the Upanishads—no more, no less. If you cannot fit the gold into the bag (because the bag is full), you must leave that bag. You may only exit room with one bag, and there should be no empty bags taken from room left over. However, it may not be possible to exit at all...
The first line contains two numbers and —the dimensions of the vault. The second line contains the coordinates of room , and the third line contains the coordinates of room . The fourth line contains the number —the number of coins that fit in one bag. Then follow lines of numbers each—these are the instructions from the Upanishads, specifying how much gold can be taken from each room.
Constraints: 1 \leq N \leq 100, 1 \leq M \leq 100, 1 \leq K \leq 1000, all numbers from the Upanishads are between and .
Output one number—the number of bags that need to be taken from room in order to exit room alive. If it is not possible to exit, print .
Example 1