Help me in solving AGELIMIT problem

My issue

My code

# cook yoT 
T = int(input())
for TC in (T):
    A,X,Y = int(input().split())
    if A>=X:
        print("YES")
    else:
        ("NO")

Problem Link: AGELIMIT Problem - CodeChef

@mounikan022
In your code, you are only checking if A is bigger than or equals to the lower bound, X. But in the given problem statement, there is also an upper age limit, denoted by Y.

You will need to check if A satisfies both conditions or not.

Another thing to add is that you are not taking inputs in the correct order. Read the problem statement fully to avoid these.

Here is my code for reference.

# cook your dish here
for _ in range(int(input())):
    x,y,a=map(int,input().split())
    if((a>=x)and(a<y)):
        print('YES')
    else:
        print('NO')