print('YNEOS'['575'not in input()::2])