Ant

No attempts yetTime limit0.15sMemory limit256 MB

Problem

A rectangular grid area is ww wide and hh tall. Its lower left corner is (0,0)(0, 0) and its upper right corner is (w,h)(w, h). One ant sits at the point (p,q)(p, q) inside this area.

The ant starts moving at a constant speed in the up-right 45 degree direction. After one hour the ant that started at (p,q)(p, q) has moved to (p+1,q+1)(p+1, q+1). When it hits a boundary while moving at that speed, it reflects and keeps the same speed.

The picture above shows the path of an ant that starts at (4,1)(4, 1) on a 6×46 \times 4 grid. That ant is at (6,3)(6, 3) after 2 hours and at (0,1)(0, 1) after 8 hours. If the ant had started at (5,3)(5, 3) on the same grid, it would move to (6,4)(6, 4), (5,3)(5, 3), (4,2)(4, 2), (3,1)(3, 1) hour by hour.

Compute and print the position (x,y)(x, y) of the ant tt hours after it starts at (p,q)(p, q) on a grid of size w×hw \times h. Assume the ant never tires and keeps the same speed.

ww and hh are natural numbers with 2w,h400002 \le w, h \le 40000. The starting coordinates pp and qq are natural numbers with 0<p<w0 < p < w and 0<q<h0 < q < h. The time tt satisfies 1t2000000001 \le t \le 200000000.

Input

The first line contains ww and hh separated by a space. The second line contains the starting coordinates pp and qq separated by a space. The third line contains the time tt the ant moves.

Output

Print xx and yy of the ant position (x,y)(x, y) after tt hours, separated by a space, on one line.