I need suggestions

Imagine a cardboard box 1200 x 1000. You have to place smaller boxes (325 x 225) inside the larger one. The smaller boxes can only be rotated in multiples of 90 degrees. How many small boxes can be fitted into the large one?

The absolute "theoretical" maximum number of boxes would be (1200 x 1000) \ (325 x 225).

So how do I go about programming the remaining logic to ascertain the "best fit"