# coding: utf-8 # Your code here! N = str(input()) if "575" in N: print("YES") else: print("NO")