Help me in solving LB02A problem

My issue

My code

# Step 1: Read and understand the problem statement and sample test cases

# Click on 'Next' once you are ready to proceed.
t = int(input())
for i in range(t):
    X,Y = map(int.input().split())
    Z = X + Y
    if Z == X and Z != Y:
        print("CHICKEN")
    elif Z != X and Z == Y:
        print("DUCKS")
    elif Z == X or Z == Y:
        print("ANY")
    else Z != X and Z != Y:
        print("NONE")
        

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