DSA series week 2, Rectangle question Error

https://www.codechef.com/viewsolution/40474391

Above is the solution I programmed, but the very first test case gives WA, while others AC.
Need help in finding out why so.

Any help is appreciated !