Artificial intelligent assistant

Ratio of number of rectangles and number of squares in a chess board We have to find the Ratio of number of rectangles (not squares) and number of squares in a chess board. For this type of question do we have to manually count the squares and rectangles or is there any other method?

The number of squares is $1^2+2^2+\dots+ 8^2=\frac{8\times9\times 17}{6}=204$ and the number of rectangles is $\binom{9}{2}^2=36^2=1296$. So the answer is $\frac{204}{1296-204}=\frac{17}{91}\approx 0.1868$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7f08b016df9f3afafda90d0727418be4