Why in code kata it throws error though my logic is correct for the given problem?

Number Range Check - Question:
Given 3 numbers N , L and R. Print ‘yes’ if N is between L and R else print ‘no’.

N = int(input())

L,R = map(int, input().split())

if N > L and N < R:

print('yes')

else:

print('no')

please correct me if am missing something

This has worked for me.

N = int(input())
L, R = map(int, input().split())
print(“yes” if L < N < R else “no”)