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