S = input() print(('NO', 'YES')['575' in S])