#include using namespace std; using ll = long long; int main(){ ll h, w; cin >> h >> w; int q; cin >> q; map mp; ll ans = h*w; for(int i = 0; i < q; i++){ ll y, x; cin >> y >> x; ll y1; if(mp.find(x)!= mp.end()) y1 = mp[x]; else y1 = h+1; if(y1 > y){ ans -= y1-y; mp[x] = y; } cout << ans << endl; } return 0; }