N = input() a = N.find('575') if a != -1: print("YES") else: print("NO")