Supposing you have a rectangle (with different weight and heigh), how can you obtain the sizes of a square that, in grid order, fits perfectly within the rectangle size?
Example of a wrong square size:

Example of a perfect fit:

The images above are of a 215.9 mm x 279.4 mm (US Letter 8.5 in x 11.0 in)
If you have squares $12.7$mm on each side, then the letter will be a $17$ by $22$ grid of these squares. Any squares larger will not fill the letter exactly, since $17$ and $22$ are coprime. I used $\gcd(2159,2794)$ and divided by $10$.