#yuki_558 s=raw_input() cnt=s.count('575') if cnt: print 'YES' else: print 'NO'