#include<iostream>
#include<cstdlib>
#include<vector>
#include<algorithm>

using namespace std;

typedef long long llong;

const llong INF = 100001000010000100;

llong x[100010],y[100010];

int main()
{
    
    int w,h,n;
    vector<llong> vx,vy;
    
    cin >> w >> h >> n;
    for(int i=0;i<n;i++){
        cin >> x[i] >> y[i];
        vx.push_back(x[i]);
        vy.push_back(y[i]);
    }
    
    sort(vx.begin(),vx.end());
    sort(vy.begin(),vy.end());
    
    llong sum[10][10];
    
    for(int i=0;i<2;i++){
        for(int j=0;j<2;j++){
            
            int dx = (n-1)/2 + i;
            int dy = (n-1)/2 + j;
            llong ma = 0;
            
            sum[i][j] = 0;
            
            for(int k=0;k<n;k++){
                sum[i][j] += 2*(llabs(vx[dx]-x[k])+llabs(vy[dy]-y[k]));
                ma = max(ma,llabs(vx[dx]-x[k])+llabs(vy[dy]-y[k]));
            }
            sum[i][j] -= ma;
        }
    }
    
    int ax=0,ay=0;
    for(int i=0;i<2;i++){
        for(int j=0;j<2;j++){
            if(sum[ax][ay] > sum[i][j]){
                ax = i;
                ay = j;
            }
        }
    }
    
    cout << sum[ax][ay] << endl;
    cout << vx[(n-1)/2+ax] << " " << vy[(n-1)/2+ay] << endl;
    
    return(0);
}
