using namespace std;

struct RectangularGrid
{
	long long countRectangles(int width, int height)
	{
		long long w = width+1;
		long long h = height+1;
		long long s = w*(w-1)/2*h*(h-1)/2;
		for(long long x=1; x<w && x<h; ++x)
			s -= (w-x)*(h-x);
		return s;
	}
};
