year,month,day = gets.chomp.split.map(&:to_i) if year <= 1988 || year >= 2020 j = "No" elsif year == 1989 if month >= 2 j = "Yes" else if day <= 7 j = "No" else j = "Yes" end end elsif year == 2019 if month >= 5 j = "No" else j = "Yes" end else j = "Yes" end puts j