Help me in solving LB02B problem

My issue

can not understand logic

Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

If there are total of X legs, and each chicken has Y legs, then X/Y will give us the number of chickens. But it should be a whole number (not a fraction). Same applies for duck. If both the values are integers it’s “ANYONE”. if both are not integers it’s “NONE”