5. In a $7 \times 7$ unit square grid, there are 64 grid points, and there are many squares with these grid points as vertices. How many different values can the areas of these squares have?
(21st Jiangsu Province Junior High School Mathematics Competition)
(提示: Consider the number of different chordal graphs in a square grid with side length less than or equal to 7 (side length is an integer) (including extreme cases, excluding those with the same area). As shown in Figure 18, the area of the shaded square is $a^{2}+$ $b^{2}$, where $0 \leqslant a+b \leqslant 7$. Without loss of generality, assume $a \geqslant b$, we can enumerate all possible $(a, b)$ values: $(0,0),(1,0), \cdots,(7,0),(1,1),(2$, 1), $\cdots,(6,1),(2,2),(3,2),(4,2),(5,2)$, $(3,3),(4,3)$, where $(0,0)$ does not meet the requirements and is discarded. In addition, $5^{2}=4^{2}+3^{2}$, i.e., $(5,0)$ and $(4,3)$ represent the same area. It is verified that other areas are all different. Therefore, there are 18 different areas.)