print 'YES' if '575' in raw_input() else 'NO'