Help me in solving RATIO2 problem

My issue

what if the text case is 9,6

give the correct code

Problem Link: https://www.codechef.com/problems/RATIO2