Problem4501--先行后列

4501: 先行后列

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

从 lns="http://www.w3.org/1998/Math/MathML">1 开始的 lns="http://www.w3.org/1998/Math/MathML">n×m 个整数按照先行后列的规律排列如下:

给定 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">m,再给定一个数字 lns="http://www.w3.org/1998/Math/MathML">c,请输出 lns="http://www.w3.org/1998/Math/MathML">c 所在的行数与列数。


Input

  • 第一行:两个整数表示 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">m
  • 第二行:一个整数表示 lns="http://www.w3.org/1998/Math/MathML">c

数据范围

  • lns="http://www.w3.org/1998/Math/MathML">1n,m10000
  • lns="http://www.w3.org/1998/Math/MathML">1cn×m




Output

  • 两个整数:表示 lns="http://www.w3.org/1998/Math/MathML">c 所在的行数与列数。

Sample Input Copy

10 10
30

Sample Output Copy

3 10

Source/Category