5. On the cells of a chessboard of size $8 \times 8$, 7 identical figures are randomly placed. Find the probability that six of them will be located either on the same row, or on the same column, or on one of the two main diagonals.
Answer: $P(A)=\frac{18 \cdot\left(C_{8}^{6} \cdot C_{56}^{1}+C_{8}^{7}\right)}{C_{64}^{7}}=\frac{591}{12942004} \approx 0.000046$.