public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int w = scn.nextInt();
        int h = scn.nextInt();
        int n = scn.nextInt();

        while (w != 0 || h != 0 || n != 0) {
            boolean board[][] = new boolean[w][h];
            int offCount = h * w;

            for (int i = 0; i < n; i++) {
                int x1 = scn.nextInt();
                int y1 = scn.nextInt();
                int x2 = scn.nextInt();
                int y2 = scn.nextInt();

                for (int x = Math.min(x1, x2) - 1; x < Math.max(x1, x2); x++) {
                    for (int y = Math.min(y1, y2) - 1; y < Math.max(y1, y2); y++) {
                        if (!board[x][y]) {
                            board[x][y] = true;
                            offCount--;
                        }
                    }
                }
            }

            if (offCount == 0) {
                System.out.println("There is no empty spots.");
            } else if (offCount == 1) {
                System.out.println("There is one empty spot.");
            } else {
                System.out.println("There are " + offCount + " empty spots.");
            }

            w = scn.nextInt();
            h = scn.nextInt();
            n = scn.nextInt();
        }
    }