Help me in solving CS02A problem

My issue

My code

# Update the program below to solve the problem

t =int(input())
for i in range(t):
    
   X, Y, A = map(int,input().split())

if A >= X and A < Y:
    
    print('YES')
else:
    
    print('NO')

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

The if else statements are outside the for loop. To fix it, make line 3,4 and 6 at same identation level

t =int(input())
for i in range(t):
    
   X, Y, A = map(int,input().split())

   if A >= X and A < Y:
          print('YES')
   else:
          print('NO')

Check this for additional resources.