# `年 月 日` の情報を受け取る input = gets(chomp: true) # スペース区切りで配列に変換する strs = input.split # `年` `月` `日` でそれぞれ数値に変換して変数に代入する year = strs[0].to_i month = strs[1].to_i day = strs[2].to_i if 1989 <= year && year <= 2019 if year == 1989 if month == 1 if day < 8 puts "No" else puts "Yes" end else puts "Yes" end elsif year == 2019 if month <= 4 puts "Yes" else puts "No" end else puts "Yes" end else puts "No" end