#include <bits/stdc++.h>
using namespace std;
long long n,m,k;
long long ans_n,ans_m;
struct node{
	int x,y,num;
}a[105][105];
int main(){
	cin>>n>>m>>k;
	int cnt=1,cnt_i=n,cnt_j=1,cnt_x=n,cnt_y=1,lsx=n,lsy=1,qx=2,qy=1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			a[i][j].num=cnt++;
		}
	}
	while(cnt_i>=1){
		if(a[lsx][lsy].num!=0){
			a[lsx][lsy].x=cnt_x;
			a[lsx][lsy].y=cnt_y;
			cnt_y++;
			lsx--;
			lsy++;
		}
		else{
			cnt_i--;
			lsx=cnt_i;
			lsy=cnt_j=1;
			cnt_x--;
			qy++;
			cnt_y=qy;
//			cout<<cnt_i<<" "<<cnt_j<<" "<<lsx<<endl;
		}
	}
	lsy=cnt_j=2;
	lsx=n;
	cnt_i=n;
	cnt_x=n+1;
	cnt_y=2;
//	cout<<cnt_x<<" "<<cnt_y<<endl;
	while(cnt_j<=m){
//		cout<<lsx<<" "<<lsy<<" "<<endl;
		if(a[lsx][lsy].num!=0){
			a[lsx][lsy].x=cnt_x;
			a[lsx][lsy].y=cnt_y;
			cnt_y++;
			lsx--;
			lsy++;
		}
		else{
			lsx=cnt_i=n;
			cnt_j++;
			lsy=cnt_j;
			cnt_x++;
			qx++;
			cnt_y=qx;
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			if(a[i][j].num==k){
				cout<<a[i][j].x<<" "<<a[i][j].y;
				return 0;
			}
		}
//		cout<<endl;
	}
	return 0;
}
/*
1:16=1 2:16=2 3:16=3 4:16=4 5:16=5 6:16=6 7:16=7 8:16=8 9:16=9 10:16=10 11:16=11 12:16=12 13:16=13 14:16=14 15:16=15 16:16=16
2:15=17 3:15=18 4:15=19 5:15=20 6:15=21 7:15=22 8:15=23 9:15=24 10:15=25 11:15=26 12:15=27 13:15=28 14:15=29 15:15=30 16:15=31 17:16=32
3:14=33 4:14=34 5:14=35 6:14=36 7:14=37 8:14=38 9:14=39 10:14=40 11:14=41 12:14=42 13:14=43 14:14=44 15:14=45 16:14=46 17:15=47 18:16=48
4:13=49 5:13=50 6:13=51 7:13=52 8:13=53 9:13=54 10:13=55 11:13=56 12:13=57 13:13=58 14:13=59 15:13=60 16:13=61 17:14=62 18:15=63 19:16=64
5:12=65 6:12=66 7:12=67 8:12=68 9:12=69 10:12=70 11:12=71 12:12=72 13:12=73 14:12=74 15:12=75 16:12=76 17:13=77 18:14=78 19:15=79 20:16=80
6:11=81 7:11=82 8:11=83 9:11=84 10:11=85 11:11=86 12:11=87 13:11=88 14:11=89 15:11=90 16:11=91 17:12=92 18:13=93 19:14=94 20:15=95 21:16=96
7:10=97 8:10=98 9:10=99 10:10=100 11:10=101 12:10=102 13:10=103 14:10=104 15:10=105 16:10=106 17:11=107 18:12=108 19:13=109 20:14=110 21:15=111 22:16=112
8:9=113 9:9=114 10:9=115 11:9=116 12:9=117 13:9=118 14:9=119 15:9=120 16:9=121 17:10=122 18:11=123 19:12=124 20:13=125 21:14=126 22:15=127 23:16=128
9:8=129 10:8=130 11:8=131 12:8=132 13:8=133 14:8=134 15:8=135 16:8=136 17:9=137 18:10=138 19:11=139 20:12=140 21:13=141 22:14=142 23:15=143 24:16=144
10:7=145 11:7=146 12:7=147 13:7=148 14:7=149 15:7=150 16:7=151 17:8=152 18:9=153 19:10=154 20:11=155 21:12=156 22:13=157 23:14=158 24:15=159 25:16=160
11:6=161 12:6=162 13:6=163 14:6=164 15:6=165 16:6=166 17:7=167 18:8=168 19:9=169 20:10=170 21:11=171 22:12=172 23:13=173 24:14=174 25:15=175 26:16=176
12:5=177 13:5=178 14:5=179 15:5=180 16:5=181 17:6=182 18:7=183 19:8=184 20:9=185 21:10=186 22:11=187 23:12=188 24:13=189 25:14=190 26:15=191 27:16=192
13:4=193 14:4=194 15:4=195 16:4=196 17:5=197 18:6=198 19:7=199 20:8=200 21:9=201 22:10=202 23:11=203 24:12=204 25:13=205 26:14=206 27:15=207 28:16=208
14:3=209 15:3=210 16:3=211 17:4=212 18:5=213 19:6=214 20:7=215 21:8=216 22:9=217 23:10=218 24:11=219 25:12=220 26:13=221 27:14=222 28:15=223 29:16=224
15:2=225 16:2=226 17:3=227 18:4=228 19:5=229 20:6=230 21:7=231 22:8=232 23:9=233 24:10=234 25:11=235 26:12=236 27:13=237 28:14=238 29:15=239 30:16=240
16:1=241 17:2=242 18:3=243 19:4=244 20:5=245 21:6=246 22:7=247 23:8=248 24:9=249 25:10=250 26:11=251 27:12=252 28:13=253 29:14=254 30:15=255 31:16=256
*/