#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;     }   }   