Help me in solving RATIO2 problem

My issue

The output of the last pair of the sample 1 seems incorrect to me. The input is 2 and 7. I think output should be 3. But the output is given 0.
What do you think?

Problem Link: Ratio By 2 Practice Coding Problem