there's a question at
qr.ae/lgats about what portion of a diagonal will pass through the black squares of an MxN checkerboard, and Alon Amit's answer is understandable except for the case where M and N are both odd. What symmetry could he mean should be exploited?