a, b, c = gets.split.map(&:to_i) if a == 1989 && b == 1 && c >= 8 puts "Yes" elsif a == 2019 && b >= 4 puts "Yes" elsif a.between?(1989..2019) puts "Yes" else puts "No" end