import java.util.*;
import java.lang.*;
import java.util.Arrays.*;
class Main
{
public static void main
(String[] args
) {
int a = 0, b = 0;
Scanner input
= new Scanner
(System.
in); int x_max = input.nextInt();
int y_max = input.nextInt();
int n = input.nextInt();
int x[] = new int[n+2];
int y[] = new int[n+2];
for(int i = 1; i < n + 1; i++)
{
x[i] = input.nextInt();
y[i] = input.nextInt();
}
x[0] = y[0] = 0;
x[n + 1] = x_max + 1;
y[n + 1] = y_max + 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];
}
System.
out.
print((a
-1)*(b
-1)); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLnV0aWwuQXJyYXlzLio7CgoKY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykKCXsKCQlpbnQgYSA9IDAsIGIgPSAwOwoJCVNjYW5uZXIgaW5wdXQgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWludCB4X21heCA9IGlucHV0Lm5leHRJbnQoKTsKCQlpbnQgeV9tYXggPSBpbnB1dC5uZXh0SW50KCk7CgkJaW50IG4gPSBpbnB1dC5uZXh0SW50KCk7CgkJaW50IHhbXSA9IG5ldyBpbnRbbisyXTsKCQlpbnQgeVtdID0gbmV3IGludFtuKzJdOwoJCWZvcihpbnQgaSA9IDE7IGkgPCBuICsgMTsgaSsrKQoJCXsKCQkJeFtpXSA9IGlucHV0Lm5leHRJbnQoKTsKCQkJeVtpXSA9IGlucHV0Lm5leHRJbnQoKTsKCQl9CQoJCXhbMF0gPSB5WzBdID0gMDsKICAgIAl4W24gKyAxXSA9IHhfbWF4ICsgMTsgCiAgICAJeVtuICsgMV0gPSB5X21heCArIDE7CiAgICAJQXJyYXlzLnNvcnQoeCk7CiAgICAJQXJyYXlzLnNvcnQoeSk7CiAgICAJZm9yKGludCBpID0gMDsgaSA8IG4gKyAxOyBpKyspCiAgICAJeyAKICAgICAgICBpZih4W2kgKyAxXS14W2ldPmEpIGEgPSB4W2kgKyAxXS14W2ldOwogICAgICAgIGlmKHlbaSArIDFdLXlbaV0+YikgYiA9IHlbaSArIDFdLXlbaV07CiAgICAJfQogICAgICAgIFN5c3RlbS5vdXQucHJpbnQoKGEtMSkqKGItMSkpOwoJfQp9