/* Auteur: Nicolas JANEY          */
/* nicolas.janey@univ-fcomte.fr   */
/* Avril 2005                     */

import java.io.*;

public class RechercheDichotomiqueRecursive {
  static BufferedReader flux = new BufferedReader(new InputStreamReader(System.in));
  
  public static double f(double x) {
    return(x*x*x-10.0);
  }
  
  public static double zero(double xi,double xf,double epsilon) {
    double x = (xf+xi)/2.0;
    if ( (xf-xi) < epsilon )
      return(x);
    if ( f(x) >= 0.0 )
      return(zero(xi,x,epsilon));
      else
      return(zero(x,xf,epsilon));    
  }
  
  public static void main(String [] args) {
    double xi = 1.0;
    double xf = 3.0;
    double x = zero(xi,xf,0.00001);
    System.out.println(x);
    System.out.println(f(x));
  }
}