#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,m; long long k; cin >> n >> m >> k; int a[n+1][m+1],b[n+1][m+1]; int x=1,y=1,ax=1,ay=1; long long z=1; for(int i=1;i<=n;i++) { x=y; for(int j=1;j<=m;j++) { a[i][j]=x; b[n-i+1][j]=x; if(z==k) { ax=i; ay=j; } x++; z++; } y++; } // for(int i=1;i<=n;i++) // { // for(int j=1;j<=m;j++) // { // cout << a[i][j] << " "; // } // cout << endl; // } // for(int i=1;i<=n;i++) // { // for(int j=1;j<=m;j++) // { // cout << b[i][j] << " "; // } // cout << endl; // } // cout << ax << " " << ay << endl; cout << a[ax][ay] << " " << b[ax][ay] << "\n"; return 0; }