public static void print ( int x , int n ) {
  int max = n * 2 - 1 ;
  if ( x == 1 || x == max ) {
    System . out . println ( "No" ) ;
    return ;
  }
  System . out . println ( "Yes" ) ;
  String sep = System . lineSeparator ( ) ;
  String ans = IntStream . range ( x + n - 1 , x + n + max - 1 ) . mapToObj ( e -> ( e % max + 1 ) + sep ) . collect ( StringBuilder :: new , StringBuilder :: append , StringBuilder :: append ) . toString ( ) ;
  System . out . println ( ans ) ;
}

public static void print ( int x , int n ) { int max = n * 2 - 1 ; if ( x == 1 || x == max ) { System . out . println ( " No " ) ; return ; } System . out . println ( " Yes " ) ; String sep = System . lineSeparator ( ) ; String ans = IntStream . range ( x + n - 1 , x + n + max - 1 ) . mapToObj ( e -> ( e % max + 1 ) + sep ) . collect ( StringBuilder :: new , StringBuilder :: append , StringBuilder :: append ) . toString ( ) ; System . out . println ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) right: (decimal_integer_literal)))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) right: (identifier))))) name: (identifier) arguments: (argument_list (method_reference (identifier)) (method_reference (identifier) (identifier)) (method_reference (identifier) (identifier)))) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))