# -*- coding: utf-8 -*- s = input() if "575" in s: print("YES") else: print("NO")