S = input() if S.__contains__("575"): print("YES") else: print("NO")