      program main
      implicit real*8 (a-h,o-z)
      integer n
      double precision x,y,xn,yn,f,g,fx,fy,gx,gy,det,err
      x=3.0d0
      y=2.0d0
      do n=1, 5
         f=x*x*x-3.0d0*x*y*y-2.0d0
         g=3.0d0*x*x*y-y*y*y-11.0d0
         fx=3.0d0*x*x-3.0d0*y*y
         fy=-6.0d0*x*y
         gx=6.0d0*x*y
         gy=3.0d0*x*x-3.0d0*y*y
         det=fx*gy-fy*gx
         xn=x-(gy*f-fy*g)/det
         yn=y-(-gx*f+fx*g)/det
         err=sqrt((xn-2.0d0)**2+(yn-1.0d0)**2)
         write(6,*) n, xn, yn, err
         x=xn
         y=yn
      end do
      stop
      end