s = gets puts (s.contains('575') ? "YES" : "NO")