#include<bits/stdc++.h> using namespace std; int main() { int a, b, c, k; cin >> a >> b >> c; cout << c/b+1 << " " << c%b+1; return 0; }