public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( in ) ;
  int size = 1000000 ;
  long [ ] fact = new long [ size ] ;
  long [ ] inv = new long [ size ] ;
  fact [ 0 ] = 1 ;
  inv [ 0 ] = 1 ;
  long mod = 1000000007 ;
  for ( int i = 1 ;
  i < size ;
  i ++ ) {
    fact [ i ] = ( fact [ i - 1 ] * i ) % mod ;
    inv [ i ] = power ( fact [ i ] , ( int ) mod - 2 ) % mod ;
  }
  int n = sc . nextInt ( ) ;
  int m = sc . nextInt ( ) ;
  if ( m == 1 ) {
    out . println ( 1 ) ;
  }
  else {
    HashMap < Integer , Integer > map = new HashMap < > ( ) ;
    int stop = ( int ) sqrt ( m ) + 1 ;
    for ( int i = 2 ;
    i <= stop ;
    i ++ ) {
      while ( m % i == 0 ) {
        m /= i ;
        map . put ( i , map . getOrDefault ( i , 0 ) + 1 ) ;
      }
    }
    if ( m != 1 ) map . put ( m , 1 ) ;
    long ans = 1 ;
    for ( int k : map . keySet ( ) ) {
      ans = ( ans % mod * fact [ n - 1 + map . get ( k ) ] % mod * inv [ n - 1 ] % mod * inv [ map . get ( k ) ] % mod ) % mod ;
    }
    out . println ( ans ) ;
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( in ) ; int size = 1000000 ; long [ ] fact = new long [ size ] ; long [ ] inv = new long [ size ] ; fact [ 0 ] = 1 ; inv [ 0 ] = 1 ; long mod = 1000000007 ; for ( int i = 1 ; i < size ; i ++ ) { fact [ i ] = ( fact [ i - 1 ] * i ) % mod ; inv [ i ] = power ( fact [ i ] , ( int ) mod - 2 ) % mod ; } int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; if ( m == 1 ) { out . println ( 1 ) ; } else { HashMap < Integer , Integer > map = new HashMap < > ( ) ; int stop = ( int ) sqrt ( m ) + 1 ; for ( int i = 2 ; i <= stop ; i ++ ) { while ( m % i == 0 ) { m /= i ; map . put ( i , map . getOrDefault ( i , 0 ) + 1 ) ; } } if ( m != 1 ) map . put ( m , 1 ) ; long ans = 1 ; for ( int k : map . keySet ( ) ) { ans = ( ans % mod * fact [ n - 1 + map . get ( k ) ] % mod * inv [ n - 1 ] % mod * inv [ map . get ( k ) ] % mod ) % mod ; } out . println ( ans ) ; } }
(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 (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (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))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)) (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (decimal_integer_literal)))) right: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (cast_expression type: (integral_type) value: (method_invocation name: (identifier) arguments: (argument_list (identifier)))) 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 (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))) right: (decimal_integer_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) right: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (identifier)) right: (array_access array: (identifier) index: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (identifier))) right: (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))