l=lambda:map(int,raw_input().split(".")) print["NO","YES"][l()>=l()]