#include<bits/stdc++.h>
using namespace std;
int main(){
	int h,l,k;
	cin>>h>>l>>k;
	int xh,xl;
	if(k%l==0){
		xh=k/l;
		xl=l;
	}
	else{
		xh=k/l+1;
		xl=k%l;
	}
	cout<<xh<<" "<<xl<<endl;
	if(xl==1 && xh!=1) cout<<xh<<" "<<h-xh+1<<endl;
	else if(xh==1 && xl!=1) cout<<xl<<" "<<h-xh+1+l-xl<<endl;
	else if(xh==1 && xl==1) cout<<"1"<<" "<<h<<endl;
	else cout<<xh+xl-1<<" "<<h-xh+1+xl-1<<endl;
	return 0;
}