SCU 2008 warmup contest 3

D: Drawing Rectangles