import java.io.*;
//import Numeric;
//import Text;

class f extends f_xa
{
   double func(double t,double a[])
   {
     double y;
     double T=t+273.15;
     y=a[0]+a[1]/T+a[2]*Math.log(T)/Math.log(10)+a[3]*T+
       a[4]*(a[5]-T)/T*Math.log(a[5]-T)/Math.log(10.0);
     return y;
   }
}

class df extends f_xak
{
    double func(double t,double a[],int k)
    {
      double Ps;
      double T=t+273.15;
      int n=a.length;
      Ps=a[0]+a[1]/T+a[2]*Math.log(T)/Math.log(10)+a[3]*T+
      a[4]*(a[5]-T)/T*Math.log(a[5]-T)/Math.log(10.0);
      Ps=Math.pow(10.0,Ps);
      double ln10=Math.log(10.0);
      double lna5=Math.log(a[5]-T);
      double ll=Ps*ln10;
      double da[]={1.0,1.0/T,Math.log(T),T,(a[5]-T)/T*lna5/ln10,a[4]/T*(lna5+1)};
      return da[k];
    }
}

class nlleast
{
 public static void main(String args[]) throws IOException
 {
 f yy=new f();
 df dy=new df();
 double k2;
 double e[]={1.656333333e3,-2.480583e6,1.792522e1,-8.86838e-2,4.617861e2,1.666666667e3};
 double xi[];
 xi=new double[500];
 double yi[];
 yi=new double[500];
 DataInputStream cin=new DataInputStream(System.in);
 System.out.println("name of input file : ");
 String in_name=Text.readString(cin);
 System.out.println(" ");
 //DataInputStream fin=new DataInputStream(new FileInputStream(in_name));
 BufferedReader fin=new BufferedReader(new FileReader(in_name));
 int i=-1;
 try {
 while(fin != null)
 {
   i++;
   xi[i]=Text.readDouble(fin);
   yi[i]=Text.readDouble(fin);
   yi[i]=Math.log(yi[i])/Math.log(10);
   System.out.println(" "+xi[i]+" "+yi[i]);
 }
     } catch(EOFException e_eof) {System.out.println("end of file"); }

 double x[]=new double[i];
 double y[]=new double[i];
 for(i=0;i<x.length;i++)
 {
 x[i]=xi[i];
 y[i]=yi[i];
 }
 k2=marquart.X2(yy,x,y,e);
 //System.out.println("k2="+k2);
 //System.out.println(Matrix.toString(marquart.A(dy,x,y,e,10.0)));
 //System.out.println(Matrix.toStringT(marquart.B(yy,dy,x,y,e)));
 e=marquart.aa(yy,dy,x,y,e);
 for(i=0;i<e.length;i++)
   {
   System.out.println(e[i]);
   }
 }
}
