Project Euler #147: Rectangles in cross-hatched grids