Shapes Algorithm

In a shape(rectangle or square) with width n and length m, We want to know how many shapes there are with width and length a and b. We also want to know the remaining forms.


Enter numbers to see the result.