#include<bits/stdc++.h> using namespace std; int n,m,x,y; long long k; int main(){ cin>>n>>m>>k; cout<<k/m+k%m<<" "<<n-k/m+k%m-1; }