public static void main ( String [ ] args ) throws Exception {
  BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
  StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ;
  int n = Integer . parseInt ( st . nextToken ( ) ) ;
  int a = Integer . parseInt ( st . nextToken ( ) ) ;
  int d = Integer . parseInt ( st . nextToken ( ) ) ;
  double [ ] timeToMax = new double [ n ] ;
  int [ ] leaveTime = new int [ n ] ;
  int [ ] maxSpeed = new int [ n ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    st = new StringTokenizer ( br . readLine ( ) ) ;
    leaveTime [ i ] = Integer . parseInt ( st . nextToken ( ) ) ;
    maxSpeed [ i ] = Integer . parseInt ( st . nextToken ( ) ) ;
    timeToMax [ i ] = ( double ) maxSpeed [ i ] / a ;
  }
  double [ ] normalTime = new double [ n ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    if ( 0.5 * a * timeToMax [ i ] * timeToMax [ i ] < d ) {
      normalTime [ i ] = timeToMax [ i ] + ( d - 0.5 * a * timeToMax [ i ] * timeToMax [ i ] ) / maxSpeed [ i ] ;
    }
    else {
      normalTime [ i ] = Math . pow ( ( double ) 2 * d / a , 0.5 ) ;
    }
    normalTime [ i ] += leaveTime [ i ] ;
  }
  double [ ] actualTime = new double [ n ] ;
  actualTime [ 0 ] = normalTime [ 0 ] ;
  for ( int i = 1 ;
  i < n ;
  i ++ ) {
    if ( normalTime [ i ] >= actualTime [ i - 1 ] ) {
      actualTime [ i ] = normalTime [ i ] ;
    }
    else {
      actualTime [ i ] = actualTime [ i - 1 ] ;
    }
  }
  for ( int i = 0 ;
  i < n ;
  i ++ ) System . out . println ( actualTime [ i ] ) ;
}

public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; int a = Integer . parseInt ( st . nextToken ( ) ) ; int d = Integer . parseInt ( st . nextToken ( ) ) ; double [ ] timeToMax = new double [ n ] ; int [ ] leaveTime = new int [ n ] ; int [ ] maxSpeed = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { st = new StringTokenizer ( br . readLine ( ) ) ; leaveTime [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; maxSpeed [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; timeToMax [ i ] = ( double ) maxSpeed [ i ] / a ; } double [ ] normalTime = new double [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { if ( 0.5 * a * timeToMax [ i ] * timeToMax [ i ] < d ) { normalTime [ i ] = timeToMax [ i ] + ( d - 0.5 * a * timeToMax [ i ] * timeToMax [ i ] ) / maxSpeed [ i ] ; } else { normalTime [ i ] = Math . pow ( ( double ) 2 * d / a , 0.5 ) ; } normalTime [ i ] += leaveTime [ i ] ; } double [ ] actualTime = new double [ n ] ; actualTime [ 0 ] = normalTime [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { if ( normalTime [ i ] >= actualTime [ i - 1 ] ) { actualTime [ i ] = normalTime [ i ] ; } else { actualTime [ i ] = actualTime [ i - 1 ] ; } } for ( int i = 0 ; i < n ; i ++ ) System . out . println ( actualTime [ i ] ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (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 (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 (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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_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))))) (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))))) (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: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (cast_expression type: (floating_point_type) value: (array_access array: (identifier) index: (identifier))) right: (identifier)))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier))))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (decimal_floating_point_literal) right: (identifier)) right: (array_access array: (identifier) index: (identifier))) right: (array_access array: (identifier) index: (identifier))) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (decimal_floating_point_literal) right: (identifier)) right: (array_access array: (identifier) index: (identifier))) right: (array_access array: (identifier) index: (identifier))))) right: (array_access array: (identifier) index: (identifier))))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (cast_expression type: (floating_point_type) value: (decimal_integer_literal)) right: (identifier)) right: (identifier)) (decimal_floating_point_literal))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (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 (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (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: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))))))