using System;
namespace yukicoder
{
class Program
{
///
/// 平成の最小値
///
private static readonly DateTime MIN_HEISEI = new DateTime(1989, 1, 8);
///
/// 平成の最大値
///
private static readonly DateTime MAX_HEISEI = new DateTime(2019, 4, 30);
///
/// 日付を比較
///
///
///
static string CompareToDate(DateTime dt)
{
return (MIN_HEISEI <= dt && dt <= MAX_HEISEI) ? "Yes" : "No";
}
static void Main(string[] args)
{
// 入力値(日付)読み込み
var inputDate = Console.ReadLine().Split(' ');
int yyyy = int.Parse(inputDate[0]);
int mm = int.Parse(inputDate[1]);
int dd = int.Parse(inputDate[2]);
var dt = new DateTime(yyyy, mm, dd);
Console.WriteLine(CompareToDate(dt));
}
}
}