s = gets.chomp! cnt = s.scan("575").count if cnt == 0 then print("NO") else print("YES") end