S = raw_input() if "575" in S: print "YES" else: print "NO"