#include<iostream>  
#include<algorithm>  
#include<queue>  
#include<map>  
#include<cmath>  
#include<cstdio>  
using namespace std;  
  
typedef pair < int , int > Pi;  
typedef long long ll;  
#define INF ( 1ll << 61 )  
#define fr first  
#define sc second  
//Pi data[100000];  
int x[100000], y[100000];  
int xx[100000], yy[1000000];  
  
ll dis( Pi a, Pi b) {  
  return llabs(a.fr - b.fr) + llabs(a.sc - b.sc);  
}  
int main(){  
  int w,h,n;  
  cin >> w >> h;  
  cin >> n;  
  
  for(int i = 0 ; i < n ; i++ ){  
    int a, b;  
    scanf("%d %d",x + i, y + i);  
    xx[i] = x[i], yy[i] = y[i];  
  }  
  sort( x, x + n);  
  sort( y, y + n);  
  
  int center = ( n - 1 ) / 2;  
  ll ret = INF;  
  int mx, my;  
  
  for(int i = center ; i < center + 2 ; i++ ){  
    for(int j = center ; j < center + 2 ; j++ ){  
      ll res = 0LL;  
      ll most = 0;  
      for(int k = 0 ; k < n ; k++ ){  
        most = max( most, dis( Pi( x[i], y[j]), Pi( xx[k], yy[k])));  
        res += dis( Pi( x[i], y[j]), Pi( xx[k], yy[k])) * 2;  
      }  
      if(ret > res - most){  
        ret = res - most;  
        mx = x[i];  
        my = y[j];  
      }  
    }  
  }  
  cout << ret << endl;  
  cout << mx << " " << my << endl;  
}  