Project Euler #85: Counting rectangles