import java.util.Scanner; public class Main { public static void main(String[] args) { Main p = new Main(); } public Main() { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int h = sc.nextInt(); int n = sc.nextInt(); int[] s = new int[n]; int[] k = new int[n]; for(int i=0;i