print('YES' if '575' in input().strip() else 'NO')