public static void main ( String args [ ] ) {
  Scanner sc = new Scanner ( System . in ) ;
  int tt = sc . nextInt ( ) ;
  while ( tt -- > 0 ) {
    int x = sc . nextInt ( ) , y = sc . nextInt ( ) ;
    char [ ] str = sc . next ( ) . toCharArray ( ) ;
    int maxx = 0 , maxy = 0 , minx = 0 , miny = 0 ;
    for ( char c : str ) {
      if ( c == 'R' ) maxx ++ ;
      else if ( c == 'L' ) minx -- ;
      else if ( c == 'U' ) maxy ++ ;
      else miny -- ;
    }
    System . out . println ( maxx >= x && minx <= x && maxy >= y && miny <= y ? "Yes" : "No" ) ;
  }
  sc . close ( ) ;
}

public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int tt = sc . nextInt ( ) ; while ( tt -- > 0 ) { int x = sc . nextInt ( ) , y = sc . nextInt ( ) ; char [ ] str = sc . next ( ) . toCharArray ( ) ; int maxx = 0 , maxy = 0 , minx = 0 , miny = 0 ; for ( char c : str ) { if ( c == ' R ' ) maxx ++ ; else if ( c == ' L ' ) minx -- ; else if ( c == ' U ' ) maxy ++ ; else miny -- ; } System . out . println ( maxx >= x && minx <= x && maxy >= y && miny <= y ? " Yes " : " No " ) ; } sc . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) 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)))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (update_expression (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (update_expression (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (update_expression (identifier))) alternative: (expression_statement (update_expression (identifier)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (ternary_expression condition: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))) consequence: (string_literal) alternative: (string_literal))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))