import java.util.Scanner; public class No779 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int Y = sc.nextInt(); int M = sc.nextInt(); int D = sc.nextInt(); int hantei = 0; // 1 = × if( Y <= 1990 && Y >= 2020 ){ hantei = 1; } if( Y == 2019 && M >= 5 ){ hantei = 1; } // 2019/05~ if( Y == 1989 && M == 1 && D <= 7 ){ hantei = 1; } // ~1989/01/07 if( hantei == 1 ){ System.out.println( "No" ); } else{ System.out.println( "Yes" ); } } }