import java.io.*;

class fa extends f_xj
{
 double func(double x[])
 {
    double ff= 1.0+Math.cos(Math.PI*(x[0]-3.0))*Math.cos(2.0*Math.PI*(x[1]-2.0))/
    (1+(x[0]-3.0)*(x[0]-3.0)+(x[1]-2.0)*(x[1]-2.0));
    return ff; 
  }
}

class fb extends f_xj
{
public double func(double x[]) 
{	
double ff;
fa fx=new fa();
return -fx.func(x); 
}
}

class NA111
{
    public static void main(String args[]) throws IOException
    {
	fb fx=new fb();
    double low[]=new double[2];
    double high[]=new double[2];
    low[0]=-10.0;high[0]=10.0;
    low[1]=-10.0;high[1]=10.0;
    //10 million iteration
    monte_carlo_opt mco=new monte_carlo_opt(10000000,low,high); 
    double xmax[]=mco.monte_carlo_max(fx);
    for(int i=0;i<xmax.length;i++)
    {System.out.println(xmax[i]);} 
    }
}
