import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int h = Integer.parseInt(sa[0]); int w = Integer.parseInt(sa[1]); int q = Integer.parseInt(sa[2]); Map map = new HashMap<>(); long ans = (long) h * w; PrintWriter pw = new PrintWriter(System.out); for (int i = 0; i < q; i++) { sa = br.readLine().split(" "); int y = Integer.parseInt(sa[0]) - 1; int x = Integer.parseInt(sa[1]) - 1; int c = map.getOrDefault(x, h); if (y < c) { int d = c - y; map.put(x, y); ans -= d; } pw.println(ans); } pw.flush(); br.close(); } }