The diagram shows a rectangle that has been dissected into nine non-overlapping squares. Given that the width and the height of the rectangle are relatively prime positive integers, find the perimeter of the rectangle.
Express every square in terms of the two smallest, $a$ and $b$: the others are $a+b$, $2a+b$, and so on around the figure; the last edge to close gives $5a=2b$. With $a=2$, $b=5$ the squares are $2,5,7,9,16,25,28,33,36$.
Check: the bottom edge is $36+33=69=25+16+28$ (top), and the left edge is $36+25=61=33+28$ (right).
The rectangle is $69\times61$, with perimeter $260$. The answer is $\boxed{260}$.
The diagram shows a rectangle that has been dissected into nine non-overlapping squares. Given that the width and the height of the rectangle are relatively prime positive integers, find the perimeter of the rectangle.