fn main() {
    let mut hwq = String::new();
    std::io::stdin().read_line(&mut hwq).ok();
    let hwq: Vec<usize> = hwq.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
    let h = hwq[0];
    let w = hwq[1];
    let q = hwq[2];
    let queries = (0..q).map(|_| {
        let mut temp = String::new();
        std::io::stdin().read_line(&mut temp).ok();
        let temp: Vec<usize> = temp.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
        (temp[0]-1, temp[1]-1)
    })
    .collect::<Vec<_>>();

    let mut mins = vec![h; w];
    let mut summary = h*w;
    for &(y, x) in queries.iter() {
        if mins[x] < y {
            println!("{}", summary);
        } else {
            summary -= mins[x] - y;
            mins[x] = y;
            println!("{}", summary);
        }
    }
}