s=input() if "575" in s: print('YES') else: print('NO')