#include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
#include<string.h>
#include<vector>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<list>
#include<queue>
#include<deque>
#include<string>
#include<stack>
#include<limits.h>
#define int long long
#define P pair<int,int>
using namespace std;

P a[100000];
int b[100000], c[100000];
int dis = LLONG_MAX;
P ans = { LLONG_MAX,LLONG_MAX };
P w;//x??§?¨???????
P x;//x??§?¨?????????¢
P y;//y??§?¨???????
P z;//y??§?¨?????????¢
signed main() {
	int n; cin >> n >> n >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i].first >> a[i].second;
		b[i] = a[i].first, c[i] = a[i].second;
	}
	sort(b, b + n); sort(c, c + n);
	if (n & 1) {
		w.first = b[n / 2];
		int k = 0;
		for (int i = 0; i < n; i++) {
			k += abs(b[i] - b[n / 2]) * 2;
		}
		x.first = k;
		k = 0;
		y.first = c[n / 2];
		for (int i = 0; i < n; i++) {
			k += abs(c[i] - c[n / 2]) * 2;
		}
		z.first = k;
	}
	else {
		w.first = b[n / 2];
		int k = 0;
		for (int i = 0; i < n; i++) {
			k += abs(b[i] - b[n / 2]) * 2;
		}
		x.first = k;
		k = 0;
		w.second = b[n / 2 - 1];
		for (int i = 0; i < n; i++) {
			k += abs(b[i] - b[n / 2 - 1]) * 2;
		}
		x.second = k;
		k = 0;

		y.first = c[n / 2];
		for (int i = 0; i < n; i++) {
			k += abs(c[i] - c[n / 2]) * 2;
		}
		z.first = k;
		k = 0;

		y.second = c[n / 2 - 1];
		for (int i = 0; i < n; i++) {
			k += abs(c[i] - c[n / 2 - 1]) * 2;
		}
		z.second = k;
	}
	for (int i = 0; i < n; i++) {
		b[i] = a[i].first, c[i] = a[i].second;
	}
	for (int i = 0; i < n; i++) {//i???????????????
		int l = x.first - abs(w.first - b[i]);
		if (n % 2 == 0)l = min(l, x.second - abs(w.second - b[i]));
		int r = z.first - abs(y.first - c[i]);
		if (n % 2 == 0)r = min(r, z.second - abs(y.second - c[i]));
		dis = min(dis, l + r);
	}
	for (int i = 0; i < n; i++) {//i???????????????
		int l = x.first - abs(w.first - b[i]);
		if (n % 2 == 0)l = min(l, x.second - abs(w.second - b[i]));
		int r = z.first - abs(y.first - c[i]);
		if (n % 2 == 0)r = min(r, z.second - abs(y.second - c[i]));
		if (dis == l + r) {
			if (n % 2 == 0 && x.first - abs(w.first - b[i])!=l) {
				ans.first = min(ans.first, w.second);
		}
			else {
				ans.first = min(ans.first, w.first);
			}
			
		}
	}
	for (int i = 0; i < n; i++) {//i???????????????
		int l = x.first - abs(w.first - b[i]);
		if (n % 2 == 0)l = min(l, x.second - abs(w.second - b[i]));
		int r = z.first - abs(y.first - c[i]);
		if (n % 2 == 0)r = min(r, z.second - abs(y.second - c[i]));
		if (dis == l + r) {
			if (n % 2 == 0 && x.first - abs(w.first - b[i]) != l) {
				ans.first = min(ans.first, w.second);
				if (w.second == ans.first) {
					if (n % 2 == 0 && z.first - abs(y.first - c[i]) != r) {
						ans.second = min(ans.second, y.second);
					}
					else {
						ans.second = min(ans.second, y.first);
					}
				}
			}
			else {
				ans.first = min(ans.first, w.first);
				if (w.first == ans.first) {
					if (n % 2 == 0 && z.first - abs(y.first - c[i]) != r) {
						ans.second = min(ans.second, y.second);
					}
					else {
						ans.second = min(ans.second, y.first);
					}
				}
			}
		}
	}
	cout << dis << endl;
	cout << ans.first << " " << ans.second << endl;
}

Measured memory_bytes: 6280