# `年 月 日` の情報を受け取る 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 && 1 <= month && 8 <= day) \ || (year <= 2019 && month <= 4 && 30 <= day) puts "yes" else puts "no" end