s = input() if s.count("575"): print("YES") else: print("NO")