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;
const int inf = (int)1e9;
const long long int INF = (long long int)1e18;
const int N = 100005;
const long long int MOD = 1000000007;
const double EPS = 1e-7;
const double PI = acos(-1.0);
const int dx[] = {+1, -1, +0, +0};
const int dy[] = {+0, +0, +1, -1};
const int hx[] = {-2, -2, -1, -1, +1, +1, +2, +2};
const int hy[] = {+1, -1, +2, -2, +2, -2, +1, -1};
const int fx[] = {-1, +0, +1, +0, +1, +1, -1, -1, +0};
const int fy[] = {+0, -1, +0, +1, +1, -1, +1, -1, +0};
const int month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int monthL[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Toggle(int N, int pos) { return (N ^= (1 << pos)); }
bool EqualTo(double a, double b) {
  if (fabs(a - b) <= EPS)
    return true;
  else
    return false;
}
bool NotEqual(double a, double b) {
  if (fabs(a - b) > EPS)
    return true;
  else
    return false;
}
bool LessThan(double a, double b) {
  if (a + EPS < b)
    return true;
  else
    return false;
}
bool LessThanEqual(double a, double b) {
  if (a < b + EPS)
    return true;
  else
    return false;
}
bool GreaterThan(double a, double b) {
  if (a > b + EPS)
    return true;
  else
    return false;
}
bool GreaterThanEqual(double a, double b) {
  if (a + EPS > b)
    return true;
  else
    return false;
}
template <typename T>
inline T printvec(vector<T> v) {
  cerr << "******** Printing Vector **********" << '\n';
  for (auto x : v) cerr << x << " ";
  cerr << '\n';
}
template <typename T>
inline T printset(set<T> s) {
  cerr << "******** Printing Set **********" << '\n';
  for (auto x : s) cerr << x << " ";
  cerr << '\n';
}
template <typename T>
inline T printmap(map<T, T> m) {
  cerr << "******** Printing Map **********" << '\n';
  for (auto x : m) cerr << x.first << " " << x.second << '\n';
  cerr << '\n';
}
bool isLeap(int year) {
  if ((year % 400 == 0 || year % 100 != 0) && (year % 4 == 0)) return true;
  return false;
}
string DecToBin(int x) {
  string s = "";
  while (x) {
    s += (x % 2) + '0';
    x /= 2;
  }
  reverse(s.begin(), s.end());
  while (s.size() < 32) s = '0' + s;
  return s;
}
int BinToDec(string s) {
  int ret = 0, base = 1;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') ret += base;
    base *= 2;
  }
  return ret;
}
int StringMod(string str, int mod) {
  int temp = 0;
  for (int i = 0; i < str.size(); i++) {
    temp = (temp * 10 + (str[i] - '0')) % mod;
  }
  return temp;
}
bool isPalin(string s) {
  int l = s.size();
  for (int i = 0; i < l / 2; i++) {
    if (s[i] != s[l - 1 - i]) return false;
  }
  return true;
}
int StrToInt(string s) {
  stringstream second(s);
  int num;
  second >> num;
  return num;
}
string IntToStr(int n) {
  string s = "";
  stringstream conv;
  conv << n;
  s = conv.str();
  return s;
}
template <typename T>
inline T GCD(T a, T b) {
  a = abs(a), b = abs(b);
  return !b ? a : GCD(b, a % b);
}
template <typename T>
inline T LCM(T x, T y) {
  T g = GCD(x, y);
  return x * y / g;
}
template <typename T>
inline T BigMod(T b, T p, T mod) {
  T res = 1 % mod, x = b % mod;
  while (p) {
    if (p & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    p >>= 1;
  }
  return res;
}
template <typename T>
inline T ModInv(T val, T mod) {
  return BigMod(val, mod - 2, mod);
}
template <typename T>
inline T Bigmod(T b, T p, T mod) {
  if (p == 0) return 1;
  T x = Bigmod(b, p / 2, mod);
  x = (x * x) % mod;
  if (p % 2 == 1) x = (b * x) % mod;
  return x;
}
template <typename T>
inline T NumDigit(T num, T base) {
  return ((T)(log10((num)) / log10((base)))) + 1;
}
template <typename T>
inline T Power(T b, T p) {
  T res = 1, x = b;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
template <typename T>
inline T IsPrime(T x) {
  if (x < 2) return false;
  for (T i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
template <typename T>
inline T SumDigit(T x) {
  T ret = 0;
  while (x) {
    ret += x % 10, x /= 10;
  }
  return ret;
}
template <typename T>
inline T ExtGCD(T a, T b, T &x, T &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  T x1, y1, gcd = ExtGCD(b, a % b, x1, y1);
  x = y1;
  y = x1 - (a / b) * y1;
  return gcd;
}
int main(int argc, char const *argv[]) {
  long long int n, m, k;
  cin >> n >> m >> k;
  if (k == 0) return cout << "1 1" << '\n', 0;
  long long int tot = n * m - 1;
  if (k == tot) return cout << "1 2" << '\n', 0;
  long long int x = (n - 1) + (m - 1);
  if (k <= n - 1) {
    cout << k + 1 << " " << 1 << '\n';
    return 0;
  }
  if (k >= n && k <= (x)) {
    cout << n << " " << m - (x - k) << '\n';
    return 0;
  }
  long long int now = k - x;
  long long int cur = (now + (m - 1) - 1) / (m - 1);
  long long int ans = (n - 1) - cur + 1;
  long long int left = k - x - (cur - 1) * (m - 1);
  cout << (n - 1) - cur + 1 << " ";
  if (ans % 2 == 1)
    cout << (m - left + 1) << '\n';
  else
    cout << left + 1 << '\n';
  return 0;
}
