print('NYOE S'['575' in input()::2])