#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef double db;

#define fr first
#define sc second
#define pb push_back
#define rep(i,x) for(ll i=0;i<x;i++)
#define rep1(i,x) for(ll i=1;i<=x;i++)
#define rrep(i,x) for(ll i=x-1;i>=0;i--)
#define rrep1(i,x) for(ll i=x;i>0;i--)
struct T{
	ll y,x,id;
};

ll W,H,N;
vector<ll> xs;
vector<ll> ys;
P p[100001];
const ll INF = 0xffffffffffffff;
P ansp;
ll ans;

ll calc(ll y,ll x){
	ll maxd=0;
	ll res=0;
	ll d;
	rep(i,N){
		d=abs(y-p[i].fr)+abs(x-p[i].sc);
		maxd=max(d,maxd);
		res+=2*d;
	}
	return res-maxd;
}

int main()
{
	cin>>W>>H>>N;
	rep(i,N){
		cin>>p[i].sc>>p[i].fr;
		ys.pb(p[i].fr);
		xs.pb(p[i].sc);
	}
	sort(xs.begin(),xs.end());
	sort(ys.begin(),ys.end());
	if(N%2==1){
		ans=calc(ys[N/2],xs[N/2]);
		ansp=P(ys[N/2],xs[N/2]);
	}
	else{
		ans=INF;
		ansp=P(0,0);
		ll nxt=calc(ys[N/2-1],xs[N/2-1]);
		if(ans>nxt){
			ans=nxt;
			ansp=P(ys[N/2-1],xs[N/2-1]);
		}
		nxt=calc(ys[N/2],xs[N/2-1]);
		if(ans>nxt){
			ans=nxt;
			ansp=P(ys[N/2],xs[N/2-1]);
		}
		nxt=calc(ys[N/2-1],xs[N/2]);
		if(ans>nxt){
			ans=nxt;
			ansp=P(ys[N/2-1],xs[N/2]);
		}
		nxt=calc(ys[N/2],xs[N/2]);
		if(ans>nxt){
			ans=nxt;
			ansp=P(ys[N/2],xs[N/2]);
		}
	}
	cout<<ans<<endl;
	cout<<ansp.sc<<" "<<ansp.fr<<endl;
}