#include using namespace std; const int64_t mod=1e9+7; int main(){ int64_t h,w,q; cin>>h>>w>>q; int64_t ans=h*w; mapisu; int x,y; while(q--){ cin>>y>>x; if(!isu.count(x)){ ans-=h+1-y; isu[x]=y; }else if(isu[x]>y){ ans-=isu[x]-y; isu[x]=y; } cout<