S = input() comparison = '575' in S if(comparison): print('YES') else: print('NO')