Need Help in a problem

Can someone please explain how to solve this problem.
Problem - A - Codeforces

Since, even w (or h) give two sheets per division, you have to find the largest power of 2 which divides w until you can divide it no longer. Same has to be calculated for h.

Let those values be tw and th. Then you need to find whether tw * th is at least n or not.

e.g. Take a 16x24 sheet.

There will be 16 divisions of w to get 16 sheets of 1x24.
Per sheet, there will be 8 divisions to get 8 sheets of 1x3.

So, total sheets produced will be 16x8 = 128

Now for two odds say 15x17. Only 1 can divide them both so total sheets = 1x1 =1 i.e no division will take place.