You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely missed the main idea about its plot, so let me lift the veil of secrecy.

Lara is going to explore yet another dangerous dungeon. Game designers decided to use good old 2D environment. The dungeon can be represented as a rectangle matrix of n rows and m columns. Cell (x, y) is the cell in the x-th row in the y-th column. Lara can move between the neighbouring by side cells in all four directions.

Moreover, she has even chosen the path for herself to avoid all the traps. She enters the dungeon in cell (1, 1), that is top left corner of the matrix. Then she goes down all the way to cell (n, 1) — the bottom left corner. Then she starts moving in the snake fashion — all the way to the right, one cell up, then to the left to the cell in 2-nd column, one cell up. She moves until she runs out of non-visited cells. n and m given are such that she always end up in cell (1, 2).

Lara has already moved to a neighbouring cell k times. Can you determine her current position?

Input

The only line contains three integers n, m and k (2 ≤ n, m ≤ 109, n is always even, 0 ≤ k < n·m). Note that k doesn't fit into 32-bit integer type!

Output

Print the cell (the row and the column where the cell is situated) where Lara ends up after she moves k times.

Examples

Input

4 3 0


Output

1 1


Input

4 3 11


Output

1 2


Input

4 3 7


Output

3 2

Note

Here is her path on matrix 4 by 3:

<image>
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void MACRO_VAR_Scan(T& t) {
  cin >> t;
}
template <typename First, typename... Rest>
void MACRO_VAR_Scan(First& first, Rest&... rest) {
  cin >> first;
  MACRO_VAR_Scan(rest...);
}
template <typename T>
void MACRO_VEC_ROW_Init(int n, T& t) {
  t.resize(n);
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Init(int n, First& first, Rest&... rest) {
  first.resize(n);
  MACRO_VEC_ROW_Init(n, rest...);
}
template <typename T>
void MACRO_VEC_ROW_Scan(int p, T& t) {
  cin >> t[p];
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Scan(int p, First& first, Rest&... rest) {
  cin >> first[p];
  MACRO_VEC_ROW_Scan(p, rest...);
}
void _main();
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  _main();
}
inline long long toInt(std::string s) {
  long long v;
  std::istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <typename A, typename B>
inline void chmin(A& a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A& a, B b) {
  if (a < b) a = b;
}
long long qp(long long a, long long b) {
  long long ans = 1ll;
  do {
    if (b & 1) ans = 1ll * ans * a;
    a = 1ll * a * a;
  } while (b >>= 1);
  return ans;
}
long long qpmod(long long a, long long b, long long mo) {
  long long ans = 1ll;
  do {
    if (b & 1) ans = 1ll * ans * a % mo;
    a = 1ll * a * a % mo;
  } while (b >>= 1);
  return ans;
}
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline bool valid(int x, int h) { return 0 <= x && x < h; }
const double EPS = 1e-8;
const double PI = acos(-1.0);
const int INF = (int)(1e9) + 7;
const long long MOD = (long long)(1e9) + 7;
const long long MOD2 = (long long)(1e18) + 9;
const long long INF2 = (long long)(1e18);
const long long INTMAX = (0x7FFFFFFFL);
const long long LLMAX = (0x7FFFFFFFFFFFFFFFL);
const int N4 = (int)1e4 + 10;
const int N5 = (int)1e5 + 10;
const int N9 = (int)1e9;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, -1, -1, 1, 1};
struct uf_tree {
  std::vector<int> parent;
  int __size;
  uf_tree(int size_) : parent(size_, -1), __size(size_) {}
  void unite(int x, int y) {
    if ((x = find(x)) != (y = find(y))) {
      if (parent[y] < parent[x]) std::swap(x, y);
      parent[x] += parent[y];
      parent[y] = x;
      __size--;
    }
  }
  bool is_same(int x, int y) { return find(x) == find(y); }
  int find(int x) { return parent[x] < 0 ? x : parent[x] = find(parent[x]); }
  int size(int x) { return -parent[find(x)]; }
  int size() { return __size; }
};
long long digitsum(long long x) {
  long long dig;
  long long summ = 0;
  while (x) {
    dig = x % 10;
    summ = summ + dig;
    x = x / 10;
  }
  return summ;
}
long long ret, cnt, cur, ans, f;
void an(long long x, long long y) { cout << x << " " << y << endl; }
void _main() {
  long long n, m, k;
  MACRO_VAR_Scan(n, m, k);
  ;
  if (k < n) {
    an(k + 1, 1);
    return;
  }
  long long ok = 0, ng = n / 2;
  while (ng - ok > 1) {
    long long mi = (ng + ok) / 2;
    if (n + mi * 2 * (m - 1) <= k)
      ok = mi;
    else
      ng = mi;
  }
  k -= n - 1 + ok * 2 * (m - 1);
  int x = n - ok * 2, y = 2;
  if (k <= m - 1) {
    an(x, k + 1);
    return;
  } else {
    an(x - 1, m - (k - (m - 1)) + 1);
    return;
  }
}
