#include #include #include #include using namespace std; #define REP(i,first,last) for (int i=first;i> W; cin >> H; cin >> N; vector w_list(W+1, false); vector h_list(H+1, false); int w_val, h_val; int w = 0; int h = 0; REP (i,0,N) { cin >> w_val; cin >> h_val; if (!w_list[w_val]) { w_list[w_val] = true; w++; } if (!h_list[h_val]) { h_list[h_val] = true; h++; } } int amari = (W - w) * (H - h); long result = W * H - amari - N; cout<