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