import java.util.Scanner; public class Yuki11{ public static void main(String[] arg){ Scanner sc = new Scanner(System.in); long tempw=0,temph=0,res; int w,h,n,temps,tempk; w = sc.nextInt(); h = sc.nextInt(); n = sc.nextInt(); int[] cs = new int[w]; int[] ck = new int[h]; for(int i = 0;i