public static void main ( String [ ] args ) {
  Scanner in = new Scanner ( System . in ) ;
  int T = in . nextInt ( ) ;
  for ( int cas = 1 ;
  cas <= T ;
  cas ++ ) {
    n = in . nextInt ( ) ;
    D = new long [ n + 2 ] ;
    L = new long [ n + 2 ] ;
    P = new int [ n + 2 ] ;
    D [ 0 ] = 0 ;
    L [ 0 ] = 0 ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      D [ i + 1 ] = in . nextLong ( ) ;
      L [ i + 1 ] = in . nextLong ( ) ;
    }
    D [ n + 1 ] = in . nextLong ( ) ;
    L [ n + 1 ] = 0 ;
    for ( int i = 0 ;
    i < n + 2 ;
    i ++ ) P [ i ] = n + 10 ;
    P [ 1 ] = 0 ;
    for ( int c = 1 ;
    c < n + 2 ;
    c ++ ) {
      if ( P [ c ] == n + 10 ) continue ;
      long my_len = Math . min ( L [ c ] , D [ c ] - D [ P [ c ] ] ) ;
      for ( int nxt = c + 1 ;
      nxt < n + 2 && D [ nxt ] - D [ c ] <= my_len ;
      nxt ++ ) {
        P [ nxt ] = Math . min ( P [ nxt ] , c ) ;
      }
    }
    System . out . printf ( "Case #%d: %s\n" , cas , P [ n + 1 ] == n + 10 ? "NO" : "YES" ) ;
  }
}

public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int cas = 1 ; cas <= T ; cas ++ ) { n = in . nextInt ( ) ; D = new long [ n + 2 ] ; L = new long [ n + 2 ] ; P = new int [ n + 2 ] ; D [ 0 ] = 0 ; L [ 0 ] = 0 ; for ( int i = 0 ; i < n ; i ++ ) { D [ i + 1 ] = in . nextLong ( ) ; L [ i + 1 ] = in . nextLong ( ) ; } D [ n + 1 ] = in . nextLong ( ) ; L [ n + 1 ] = 0 ; for ( int i = 0 ; i < n + 2 ; i ++ ) P [ i ] = n + 10 ; P [ 1 ] = 0 ; for ( int c = 1 ; c < n + 2 ; c ++ ) { if ( P [ c ] == n + 10 ) continue ; long my_len = Math . min ( L [ c ] , D [ c ] - D [ P [ c ] ] ) ; for ( int nxt = c + 1 ; nxt < n + 2 && D [ nxt ] - D [ c ] <= my_len ; nxt ++ ) { P [ nxt ] = Math . min ( P [ nxt ] , c ) ; } } System . out . printf ( " Case ▁ # % d : ▁ % s \n " , cas , P [ n + 1 ] == n + 10 ? " NO " : " YES " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (continue_statement)) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)) (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (array_access array: (identifier) index: (identifier)))))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))) right: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)) (identifier))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal) (identifier) (ternary_expression condition: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (string_literal) alternative: (string_literal)))))))))