Project Euler 85 - Counting Rectangles

Official link: https://projecteuler.net/problem=85