object Main { def main(A:Array[String])={ val s = new java.util.Scanner(System.in) val c=Ordering[(Int,Int,Int)] val d=(s.nextInt,s.nextInt,s.nextInt) println(if(c.lt((1989,1,7),d)&&c.lt(d,(2019,5,1))) "Yes" else "No") } }