#include using namespace std; using ll=long long; int main(){cin.tie(0);ios::sync_with_stdio(false); ll W,H;cin>>W>>H; int N;cin>>N; vectorx(N),y(N); bool o=true; for(int i=0;i>x[i]>>y[i]; o&=(x[i]+y[i])%2==(x[0]+y[0])%2; } ll z=0; if(o){ for(int _=0;_<2;++_){ for(int _=0;_<4;++_){ ll mx=2e9,MX=-2e9; ll my=2e9,MY=-2e9; ll mp=2e9,MP=-2e9; ll mm=2e9,MM=-2e9; for(int i=0;i=MM-mm; bool d=c; bool e=MP-mp==MM-mm; int k=-1; ll m=2e9; for(int i=0;i=0)z=max(z,m); } for(int i=0;i