s = input() print('YeS' if '575' in s else 'NO')