Brickwork

We are attempting to design a wall as a tessellation of 2D rectangular brick shapes,
with all of the bricks having exact integer coordinates and exact integer sizes.

Given a description of the brickwork in this 2D wall, determine if the wall is indeed a
wall-covering a perfect rectangle with no overlapping bricks and with no empty spaces
in between bricks. This means that every non-integer-coordinate inside the region
should be covered by exactly one brick.

figure[!h]
sample1.pdf
sample2.pdf
sample3.pdf
Brickwork illustrating samples 1, 2, and 3 respectively.
figure

Input
  itemize
  One line containing the number of bricks,  ().
   further lines, each containing the description of a brick as four
        integers  giving the xy-coordinates, width, and height
        (; ).
  itemize

Output
  Output yes if the bricks constitute a valid wall, no otherwise.
