#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int x_max, y_max, n, a=0, b=0;
cin>>x_max>>y_max>>n;
int *x=new int[n+2];
int *y=new int[n+2];
for(int i=1;i<n+1;i++)
cin>>x[i]>>y[i];
x[0] = y[0] = 0;
x[n+1] = x_max + 1;
y[n+1] = y_max + 1;
sort(x, x + n+1);
sort(y, y + n+1);
for(int i=0; i<n+1; i++){
if(x[i+1]-x[i]>a) a=x[i+1]-x[i];
if(y[i+1]-y[i]>b) b=y[i+1]-y[i];
}
cout<<(a-1)*(b-1);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgeF9tYXgsIHlfbWF4LCBuLCBhPTAsIGI9MDsKICAgIGNpbj4+eF9tYXg+PnlfbWF4Pj5uOwogICAgaW50ICp4PW5ldyBpbnRbbisyXTsKICAgIGludCAqeT1uZXcgaW50W24rMl07CiAgICBmb3IoaW50IGk9MTtpPG4rMTtpKyspIAogICAgICAgY2luPj54W2ldPj55W2ldOwogICAgeFswXSA9IHlbMF0gPSAwOwogICAgeFtuKzFdID0geF9tYXggKyAxOyAKICAgIHlbbisxXSA9IHlfbWF4ICsgMTsKICAgIHNvcnQoeCwgeCArIG4rMSk7CiAgICBzb3J0KHksIHkgKyBuKzEpOwogICAgZm9yKGludCBpPTA7IGk8bisxOyBpKyspeyAKICAgICAgICBpZih4W2krMV0teFtpXT5hKSBhPXhbaSsxXS14W2ldOwoJaWYoeVtpKzFdLXlbaV0+YikgYj15W2krMV0teVtpXTsKICAgIH0KICAgIGNvdXQ8PChhLTEpKihiLTEpOwogICAgcmV0dXJuIDA7Cn0=