Given an

grid, where the horizontal coordinate ranges from 1 to

, and the vertical coordinate ranges from 1 to

.
For each grid cell
)
, its energy at the

-th second is defined as
%20%3D%20(x%20%2B%20y%20%2B%20t))
. For example, for the grid cell at
)
, its energy at the 0-th second is 2, at the 1-th second is 3, and so on.
Initially (at the 0-th second), the character is located in the grid cell with coordinates
)
. Initially, the character has a horizontal velocity of

and a vertical velocity of

.
Your character possesses a magical acceleration item. When you are at point
)
, your velocity will be boosted, and both your horizontal and vertical velocities will increase by the energy value of the grid cell you are in. For example, if your current horizontal velocity is 3, vertical velocity is 4, and the grid cell has an energy of 6, then your velocity will change to horizontal velocity 9 and vertical velocity 10.
After gaining the boost, your character will start moving based on your velocity. Let the new velocities be denoted by new

and

. Then, for each second passed, the character moves to the position
%20%5C%25%20n%20%2B%201%2C%20(y%2Bdy-1)%20%5C%25%20n%20%2B%201))
.
Your task is to determine the coordinates where the character will be after

seconds.