DVD and slut
Peter can not accustom themselves to order. He always throws his belongings, and then for a long time can not find the desired object. And, most importantly, in my room from the often satisfied with such a mess, and that he then can not find a free place to work. One day before school Pete urgently needed to find a CD with their favorite cartoons, which he promised to give his friend. But of course DVD from Petit also in a mess, boxes are reversed, the inscriptions on the boxes do not correspond to their content. Therefore, to find the correct drive, Peter poured them all out of the box on the table and started frantically going over in search of desired. The required disk Petya yet found, and all the rest were left lying on the table. Very sad, that before this Peter poured on the table is a heap of coins, which, as we know, too, are small discs Earlier Peter had breakfast and left the dirty dishes on the table. As a result, on a table at Petit remained nightmarish mess! Marinka - Petit's younger sister - has decided to somehow restore order at the table, but the wheels and other things she did not touch, but just covered rectangular sheets of paper those portions of the table where lay the abandoned Petya items. Sheets of paper she placed so that their sides were parallel to the edges of the table, with Marina tried to use as soon as smaller sheets of paper. Sheets of paper can not overlap. Each disc can be served by only one sheet of paper. After the work done Marinka was interesting to know what area is left uncovered paper. Help Marinka solve this problem!
Input In the first line of the input file are given two integers: X, Y - the size of the table horizontally and vertically (0 < X, Y ≤ 1000). On the second line of the file is a single integer N - number of discs on the table (0 ≤ N ≤ 100). Then follow N lines, each of which contains x[i], y[i], r[i] - the whole center coordinates and radius of the round objects. It is guaranteed that the round objects are entirely on the table and not hang over the edge of the table. Output Display area of the table, free from rectangular sheets of paper that cover subjects.