There are total $64$ squares in the chess board.
$8$ squares on the diagonal lines,
$7$ squares on each consecutive side of diagonal line,
$6$ on next to consecutive line of diagonal line and so on.
$\therefore $ Number of ways
$=\left[\left({ }^{3} C _{3}+{ }^{4} C _{3}+{ }^{5} C _{3}+{ }^{6} C _{3}+{ }^{7} C _{3}\right) \times 2+{ }^{8} C _{3}\right] \times 2 $
$=392$