S,T,c=input().split() if ST and c==">": ans="YES" else: ans="NO" print(ans)