Little math problem

OK, probably you already had your latte this morning but here is nice puzzle:

Let's say that a rectangle is "rational" if the ratio between the width and height is a rational number. Now, proof that a rectangle is rational if and only if the rectangle can be completely covered with a finite number of squares. Obviously, the squares must not overlap and must be contained in the rectangle.