       implicit real*8(a-h,o-z)
       dimension x(153456),y(153456),xx(6),yy(6)
       dimension ixy(3,333333),jxy(3,333333),kxy(2,15000)
       dimension iout(153456,100),jout(153456),kout(100)
       dimension d(5,153456),kko(153456)
       real*4 xw,yw,x1,y1,x2,y2,x3,y3,xmin,ymin,xd,yd
c      ****  specify output file name  ****
       open (8,file='delone2.out')
c      ************************************
       do 100 i=1,153456
       kko(i)=0
  100  jout(i)=0
       open(9,file='delone1.out')
       read(9,1) n,tx,ty,xmin,ymin
       read(9,1) (id,x(i),y(i),(d(j,i),j=1,5),i=1,n)
    1  format(i5,2f12.8,f12.5,f14.7,3f9.4)
c      call plots(1h ,0.0)
c      call plot(2.,2.,-3)
       xw=20.
c      yw=20.*ty/tx
       yw=20.*ty/tx/cos(3.141592/180.*(ymin+ty/2))
       xd=tx/xw
       yd=ty/yw
c      go to 789
c      call plot(0.0,0.0,3)
c      call plot(xw ,0.0,2)
c      call plot(xw ,yw ,2)
c      call plot(0.0,yw ,2)
c      call plot(0.0,0.0,2)
c      do 20 i=1,n
c      x1=x(i)/tx*xw
c      y1=y(i)/ty*yw
c      call symbol(x1,y1,0.05*2.6,11,0.0,-1)
c  20  continue
c      call xychiz(xw,yw,xmin,xd,ymin,yd)
c      go to 987
c      call ploti
c      call plot(2.,2.,-3)
c 789  continue
c      call plot(0.0,0.0,3)
c      call plot(xw ,0.0,2)
c      call plot(xw ,yw ,2)
c      call plot(0.0,yw ,2)
c      call plot(0.0,0.0,2)
       i=1
       n1=4
       n2=0
   50  read(9,*,end=60) id1,(ixy(j,i),j=1,3),d2
       x(n+1)=0.0
       y(n+1)=0.0
       x(n+2)=tx
       y(n+2)=0.0
       x(n+3)=tx
       y(n+3)=ty
       x(n+4)=0.0
       y(n+4)=ty
c      write(6,*) id1
       call fo(n,i,ixy,tx,ty,n1,n2,x,y,jxy,kxy)
       i=i+1
       go to 50
c  60  nn=i-1
   60  nn=n2
c      nn=8002
c      write(6,*) n1+n
c      do 888 i=1,n1
c      write(6,*) i,kxy(1,i),kxy(2,i)
c 888  continue
c      stop
       write(8,9) n,n1+n,nn,tx,ty
    9 format(3i10,2f12.5)
       do 999 i=1,n1+n
  999  write(8,22) i,x(i),y(i),(d(j,i),j=1,5)
   22  format(i5,2f12.8,f8.2,f14.7,3f9.4)
c      stop
       n3=0
       ss=0
       do 10 i=1,nn
c      read(9,*) id1,(ixy(j,i),j=1,3),id2
c      call xyd(x,y,ixy(1,i),tx,ty,xx,yy)
c     if(ixy(1,i).lt.0.or.ixy(2,i).lt.0.or.ixy(3,i).lt.0) then
c      write(6,*) i,(ixy(j,i),j=1,3)
c      write(6,*) (xx(j),j=1,3)
c      write(6,*) (yy(j),j=1,3)
c      write(6,*) (xx(j),j=4,6)
c      write(6,*) (yy(j),j=4,6)
c      x1=xx(4)/tx*xw
c      y1=yy(4)/ty*yw
c      call plot(x1,y1,3)
c      x2=xx(5)/tx*xw
c      y2=yy(5)/ty*yw
c      call plot(x2,y2,2)
c      x3=xx(6)/tx*xw
c      y3=yy(6)/ty*yw
c      call plot(x3,y3,2)
c      call plot(x1,y1,2)
c      call ar(xx(4),yy(4),s)
c      ss=ss+s
c      n3=n3+1
c      write(8,2) n3,(xx(j),yy(j),j=4,6),s
c      end if
       i1=jxy(1,i)
       i2=jxy(2,i)
       i3=jxy(3,i)
c      write(6,*) i,i1,i2,i3
       x1=x(i1)/tx*xw
       y1=y(i1)/ty*yw
c      call plot(x1,y1,3)
       x2=x(i2)/tx*xw
       y2=y(i2)/ty*yw
c      call plot(x2,y2,2)
       x3=x(i3)/tx*xw
       y3=y(i3)/ty*yw
c      write(6,*) x1,y1
c      write(6,*) x2,y2
c      write(6,*) x3,y3
c      call plot(x3,y3,2)
c      call plot(x1,y1,2)
       call ar(x,y,i1,i2,i3,s)
       ss=ss+s
       n3=n3+1
c      write(8,1) n3,(xx(j),yy(j),j=1,3),s
       write(8,2) n3,(jxy(j,i),j=1,3),s
    2  format(i7,3i8,d20.12)
       call pp(i1,i2,i3,iout,jout)
   10  continue
c      call xychiz(xw,yw,xmin,xd,ymin,yd)
       write(6,*) 'ss=',ss,'tx*ty=',tx*ty
       kmax=0
       do 200 i=1,n+n1
       k=jout(i)
       kko(i)=kko(i)+k
       do 210 j=1,k
       kout(j)=iout(i,j)
       kko1=kout(j)
       kko(kko1)=kko(kko1)+1
  210  continue
       if(k.gt.1) call rr(k,kout)      
       write(8,3) i,k,(kout(j),j=1,k)
    3  format(2i7,2x,10i7/(16x,10i7))
       if(kmax.lt.k) kmax=k
  200  continue
       write(6,*) kmax
       kmax=0
       do 300 i=1,n+n1
       if(kmax.lt.kko(i)) kmax=kko(i)
  300  continue
  987  continue
       write(8,*) kmax  
       write(6,*) kmax
c      call plote
       stop
       end
c      subroutine xyd(x,y,ixy,tx,ty,xx,yy)
c      implicit real*8(a-h,o-z)
c      dimension x(5000),y(5000),xx(6),yy(6)
c      dimension ixy(3),ip(2)
c      i1=0
c      do 100 i=1,3
c      if(ixy(i).lt.0) i1=i1+1
c 100  continue
c      if(i1.gt.0) write(6,*) 'i1',i1,ixy
c      if(i1.eq.0) then
c      do 10 i=1,3
c      ii=ixy(i)
c      xx(i)=x(ii)
c      yy(i)=y(ii)
c  10  continue
c      return
c      end if
c      if(i1.eq.1) then
c      j1=0
c      do 20 i=1,3
c      if(ixy(i).lt.0) i2=ixy(i)
c      if(ixy(i).lt.0) go to 20
c      j1=j1+1
c      ip(j1)=ixy(i)
c      ii=ixy(i)
c      xx(j1)=x(ii)
c      yy(j1)=y(ii)
c  20  continue
c      j1=ip(1)
c      j2=ip(2)
c      if(i2.eq.-1) then
c      if(x(j1).le.x(j2)) then
c      xx(3)=0.0
c      yy(3)=y(j1)
c      xx(4)=0.0
c      yy(4)=y(j2)
c      xx(5)=0.0
c      yy(5)=y(j1)
c      xx(6)=x(j2)
c      yy(6)=y(j2)
c      else
c      xx(3)=0.0
c      yy(3)=y(j2)
c      xx(4)=0.0
c      yy(4)=y(j1)
c      xx(5)=0.0
c      yy(5)=y(j2)
c      xx(6)=x(j1)
c      yy(6)=y(j1)
c      end if
c      end if
c      if(i2.eq.-2) then
c      if(x(j1).gt.x(j2)) then
c      xx(3)=tx
c      yy(3)=y(j1)
c      xx(4)=tx
c      yy(4)=y(j2)
c      xx(5)=tx
c      yy(5)=y(j1)
c      xx(6)=x(j2)
c      yy(6)=y(j2)
c      else
c      xx(3)=tx
c      yy(3)=y(j2)
c      xx(4)=tx
c      yy(4)=y(j1)
c      xx(5)=tx
c      yy(5)=y(j2)
c      xx(6)=x(j1)
c      yy(6)=y(j1)
c      end if
c      end if
c      if(i2.eq.-3) then
c      if(x(j1).le.x(j2)) then
c      xx(3)=x(j1)
c      yy(3)=0.0
c      xx(4)=x(j2)
c      yy(4)=0.0
c      xx(5)=x(j1)
c      yy(5)=0.0
c      xx(6)=x(j2)
c      yy(6)=y(j2)
c      else
c      xx(3)=x(j2)
c      yy(3)=0.0
c      xx(4)=x(j1)
c      yy(4)=0.0
c      xx(5)=x(j2)
c      yy(5)=0.0
c      xx(6)=x(j1)
c      yy(6)=y(j1)
c      end if
c      end if
c      if(i2.eq.-4) then
c      if(x(j1).le.x(j2)) then
c      xx(3)=x(j1)
c      yy(3)=ty
c      xx(4)=x(j2)
c      yy(4)=ty
c      xx(5)=x(j1)
c      yy(5)=ty
c      xx(6)=x(j2)
c      yy(6)=y(j2)
c      else
c      xx(3)=x(j2)
c      yy(3)=ty
c      xx(4)=x(j1)
c      yy(4)=ty
c      xx(5)=x(j2)
c      yy(5)=ty
c      xx(6)=x(j1)
c      yy(6)=y(j1)
c      end if
c      end if
c      write(6,*) (xx(j),j=1,3)
c      write(6,*) (yy(j),j=1,3)
c      write(6,*) (xx(j),j=4,6)
c      write(6,*) (yy(j),j=4,6)
c      return
c      end if
c      if(i1.eq.2) then
c      j1=0
c      do 30 i=1,3
c      if(ixy(i).gt.0) i2=ixy(i)
c      if(ixy(i).gt.0) go to 30
c      j1=j1+1
c      ip(j1)=ixy(i)
c  30  continue
c      xx(1)=x(i2)
c      yy(1)=y(i2)
c      xx(4)=x(i2)
c      yy(4)=y(i2)
c      if(ip(1).eq.-4.and.ip(2).eq.-1) then
c      xx(2)=0.0
c      yy(2)=ty
c      xx(3)=x(i2)
c      yy(3)=ty
c      xx(5)=0.0
c      yy(5)=ty
c      xx(6)=0.0
c      yy(6)=y(i2)
c      end if
c      if(ip(1).eq.-4.and.ip(2).eq.-2) then
c      xx(2)=tx
c      yy(2)=ty
c      xx(3)=x(i2)
c      yy(3)=ty
c      xx(5)=tx
c      yy(5)=ty
c      xx(6)=tx
c      yy(6)=y(i2)
c      end if
c      if(ip(1).eq.-3.and.ip(2).eq.-1) then
c      xx(2)=0.0
c      yy(2)=0.0
c      xx(3)=x(i2)
c      yy(3)=0.0
c      xx(5)=0.0
c      yy(5)=0.0
c      xx(6)=0.0
c      yy(6)=y(i2)
c      end if
c      if(ip(1).eq.-3.and.ip(2).eq.-2) then
c      xx(2)=tx
c      yy(2)=0.0
c      xx(3)=x(i2)
c      yy(3)=0.0
c      xx(5)=tx
c      yy(5)=0.0
c      xx(6)=tx
c      yy(6)=y(i2)
c      end if
c      end if
c      return
c      end
       subroutine ar(x,y,i1,i2,i3,s)
       implicit real*8(a-h,o-z)
       dimension x(153456),y(153456)
       x1=x(i1)-x(i3)
       x2=x(i2)-x(i3)
       y1=y(i1)-y(i3)
       y2=y(i2)-y(i3)
       if((x1**2+x2**2)*(y1**2+y2**2)-(x1*y1+x2*y2)**2.gt.0.0) then
       s=1./2.*sqrt((x1**2+x2**2)*(y1**2+y2**2)-(x1*y1+x2*y2)**2)
       else
       s=0.0
       end if
       return
       end
       subroutine fo(n,i,ixy,tx,ty,n1,n2,x,y,jxy,kxy)
       implicit real*8(a-h,o-z)
       dimension x(153456),y(153456)
       dimension ixy(3,333333),jxy(3,333333),kxy(2,15000)
       dimension kp(3)
       ii=0
       do 10 j=1,3
       if(ixy(j,i).le.0) ii=ii+1
   10  continue
c      write(6,*) i,ii,(ixy(j,i),j=1,3)
       if(ii.eq.0) then
       n2=n2+1
       do 20 j=1,3
       jxy(j,n2)=ixy(j,i)
   20  continue
       return
       end if
       if(ii.eq.1) then
c      write(6,*) i,ii,(ixy(j,i),j=1,3)
       ix=ixy(1,i)
       do 30 j=2,3
       if(n1.eq.4) go to 50
       do 40 k=5,n1
       if(ix.ne.kxy(1,k)) go to 40
       if(ixy(j,i).ne.kxy(2,k)) go to 40
       kp(j)=k
       go to 30
   40  continue
   50  n1=n1+1 
       kxy(1,n1)=ix
       kxy(2,n1)=ixy(j,i)
       if(ix.eq.-1) then
       x(n+n1)=0.0
       iy=ixy(j,i)
       y(n+n1)=y(iy)
       end if
       if(ix.eq.-2) then
       x(n+n1)=tx
       iy=ixy(j,i)
       y(n+n1)=y(iy)
       end if
       if(ix.eq.-3) then
       y(n+n1)=0.0
       iy=ixy(j,i)
       x(n+n1)=x(iy)
       end if
       if(ix.eq.-4) then
       y(n+n1)=ty
       iy=ixy(j,i)
       x(n+n1)=x(iy)
       end if
       kp(j)=n1
c      write(6,*) j,n1,n+n1,ix,x(n+n1),y(n+n1)
   30  continue
       n2=n2+1
       do 60 j=1,2
       jxy(j,n2)=ixy(j+1,i)
   60  continue
       jxy(3,n2)=kp(2)+n
c      write(6,*) n1,n2
c      write(6,*) i,(ixy(j,i),j=1,3)
c      write(6,*) n2,(jxy(j,n2),j=1,3)
       n2=n2+1
       jxy(1,n2)=kp(3)+n
       jxy(2,n2)=kp(2)+n
       jxy(3,n2)=ixy(3,i)
c      write(6,*) n2,(jxy(j,n2),j=1,3)
       return
       end if
       if(ii.eq.2) then
       do 130 j=1,2
       ix=ixy(j,i)
       if(n1.eq.0) go to 150
       do 140 k=1,n1
       if(ix.ne.kxy(1,k)) go to 140
c      if(ixy(3,j).ne.kxy(j,k)) go to 140
       if(ixy(3,i).ne.kxy(2,k)) go to 140
       kp(j)=k
       go to 130
  140  continue
  150  n1=n1+1 
       kxy(1,n1)=ix
       kxy(2,n1)=ixy(3,i)
       if(ix.eq.-1) then
       x(n+n1)=0.0
       iy=ixy(3,i)
       y(n+n1)=y(iy)
       end if
       if(ix.eq.-2) then
       x(n+n1)=tx
       iy=ixy(3,i)
       y(n+n1)=y(iy)
       end if
       if(ix.eq.-3) then
       y(n+n1)=0.0
       iy=ixy(3,i)
       x(n+n1)=x(iy)
       end if
       if(ix.eq.-4) then
       y(n+n1)=ty
       iy=ixy(3,i)
       x(n+n1)=x(iy)
       end if
       kp(j)=n1
  130  continue
       if(ixy(1,i).eq.-4.and.ixy(2,i).eq.-1) then
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+4
       jxy(3,n2)=kp(1)+n
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+4
       jxy(3,n2)=kp(2)+n
       end if
       if(ixy(1,i).eq.-4.and.ixy(2,i).eq.-2) then
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+3
       jxy(3,n2)=kp(1)+n
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+3
       jxy(3,n2)=kp(2)+n
       end if
       if(ixy(1,i).eq.-3.and.ixy(2,i).eq.-1) then
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+1
       jxy(3,n2)=kp(1)+n
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+1
       jxy(3,n2)=kp(2)+n
       end if
       if(ixy(1,i).eq.-3.and.ixy(2,i).eq.-2) then
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+2
       jxy(3,n2)=kp(1)+n
       n2=n2+1
       jxy(1,n2)=ixy(3,i)
       jxy(2,n2)=n+2
       jxy(3,n2)=kp(2)+n
       end if
       return
       end if
       end 
       subroutine pp(j1,j2,j3,iout,jout)
       dimension iout(153456,100),jout(153456)
       do 100 m=1,3
       if(m.eq.1) then
       i1=j1
       i2=j2
       i3=j3
       end if
       if(m.eq.2) then
       i1=j2
       i2=j3
       i3=j1
       end if
       if(m.eq.3) then
       i1=j3
       i2=j1
       i3=j2
       end if
       if(i1.lt.i2) then
       if(jout(i1).eq.0) then
       jout(i1)=jout(i1)+1
       k=jout(i1)
       if(k.gt.100) write(6,*) 'k',k
       iout(i1,k)=i2
       else
       k=jout(i1)
       do 10 i=1,k
       if(iout(i1,i).eq.i2) go to 20
   10  continue
       jout(i1)=jout(i1)+1
       k=jout(i1)
       if(k.gt.100) write(6,*) 'k',k
       iout(i1,k)=i2
   20  continue
       end if
       end if
       if(i1.lt.i3) then
       if(jout(i1).eq.0) then
       jout(i1)=jout(i1)+1
       k=jout(i1)
       if(k.gt.100) write(6,*) 'k',k
       iout(i1,k)=i3
       else
       k=jout(i1)
       do 30 i=1,k
       if(iout(i1,i).eq.i3) go to 40
   30  continue
       jout(i1)=jout(i1)+1
       k=jout(i1)
       if(k.gt.100) write(6,*) 'k',k
       iout(i1,k)=i3
   40  continue
       end if
       end if
  100  continue
       return
       end 
       subroutine rr(k,kout)
       dimension kout(100),kw(100)
       do 10 i=1,k-1
       kmax=kout(i)
       kk=i
       do 20 j=i+1,k
       if(kmax.lt.kout(j)) go to 20
       kmax=kout(j)
       kk=j
   20  continue
       kout(kk)=kout(i)
       kout(i)=kmax
   10  continue
       return
       end
c     subroutine xychij(xw,yw,xmin,xd,ymin,yd)
c     dimension npi(50),npf(50),fln(2000),flt(2000)
c     open(1,file='/home6/ogata/vos3files/noaajma/jpmap')
c     call newpen(3)
c  10 read(1,1,end=20) nlt,nln,np,nl1,nl2,nl3,(npi(k),npf(k),k=1,nl3)
c   1 format(64i5)
c     read(1,2) (flt(i),fln(i),i=1,np)
c   2 format(40f8.3)
c     nxmin=(xmin-120)/2+0.1
c     nxmax=(xmin+xd*xw-120)/2+1.1
c     nymin=(ymin-20)/2+0.1
c     nymax=(ymin+yd*yw-20)/2+1.1
c     write(6,*) nlt,nln,nxmin,nxmax,nymin,nymax
c     if(nxmin.gt.nln) go to 10
c     if(nxmax.lt.nln) go to 10
c     if(nymin.gt.nlt) go to 10
c     if(nymax.lt.nlt) go to 10
c     do 30 k=1,nl3
c     do 30 k=1,nl1
c     is=npi(k)
c     ie=npf(k)
c     x1=(fln(is)-xmin)/xd
c     y1=(flt(is)-ymin)/yd
c     call plot(x1,y1,3)
c     iss=0
c     do 40 i=is,ie
c     x1=(fln(i)-xmin)/xd
c     y1=(flt(i)-ymin)/yd
c     if(x1.lt.0.0.or.x1.gt.xw) go to 41
c     if(y1.lt.0.0.or.y1.gt.yw) go to 41
c     if(i.eq.is.or.iss.eq.0) go to 42
c     call plot(x1,y1,2)
c     go to 40
c  41 iss=0
c     go to 40
c  42 call plot(x1,y1,3)
c     iss=1
c  40 continue
c     x1=(fln(is)-xmin)/xd
c     y1=(flt(is)-ymin)/yd
c     do 40 i=is+1,ie
c     x2=(fln(i)-xmin)/xd
c     y2=(flt(i)-ymin)/yd
c     if((x1.lt.0.0.or.x1.gt.xw).and.(x2.lt.0.0.or.x2.gt.xw)) go to 45
c     if((y1.lt.0.0.or.y1.gt.yw).and.(y2.lt.0.0.or.y2.gt.yw)) go to 45
c     call plot(x1,y1,3)
c     call plot(x2,y2,2)
c  45 x1=x2
c     y1=y2
c  40 continue
c  30 continue
c     go to 10
c  20 continue
c     call newpen(1)
c     close(1)
c     return
c     end
c     SUBROUTINE XYCHIZ(XW,YW,XMIN,XD,YMIN1,YD)                                 
c     DIMENSION NPI(50),NPF(50),FLN(2000),FLT(2000),IC1(30000)                  
c     ymin=ymin1+90.
c     write(6,*) 'ymin',ymin
c     IC2=0                                                                     
c     IC3=0                                                                     
c     I0=0                                                                      
c     I1=1                                                                      
c     open(1,file='/home6/ogata/maps/world.map.data')
c  10 READ(1,1,END=20) NLT,NLN,NP,NL3,(NPI(K),NPF(K),K=1,NL3)                   
c   1 FORMAT(64I5)                                                              
c     write(6,*) 'nlt',nlt,np,nl3,ic2
c     READ(1,2) (FLT(I),FLN(I),I=1,NP)                                          
c   2 FORMAT(40F8.3)                                                            
c     DO 30 K=1,NL3                                                             
c     IS=NPI(K)                                                                 
c     IE=NPF(K)                                                                 
c     XXX=FLN(IS)                                                               
c     YYY=FLT(IS)+90.                                                           
c     IF(XXX.LT.0.0) XXX=360.+XXX                                               
c     X1=(XXX-XMIN)/XD                                                          
c     Y1=(YYY-YMIN)/YD                                                          
c     CALL PLOT(X1,Y1,3)                                                        
c     IF(X1.GE.0.0.AND.X1.LE.XW.AND.Y1.GE.0.0.AND.Y1.LE.YW)  THEN               
c     WRITE(9,9) FLN(IS),FLT(IS)                                                
c     WRITE(9,9) xxx,FLT(IS)                                                
c   9 FORMAT(1H ,2F10.3,I5)                                                     
c     IF(IC2.NE.0) IC1(IC2)=IC3                                                 
c     IC2=IC2+1                                                                 
c     IC3=IC3+1                                                                 
c     IC4=1                                                                     
c     END IF                                                                    
c     XX1=X1                                                                    
c     DO 40 I=IS+1,IE                                                           
c     XXX=FLN(I)                                                                
c     IF(XXX.LT.0.0) XXX=360.+XXX                                               
c     X1=(XXX-XMIN)/XD                                                          
c     YYY=FLT(I)+90.                                                            
c     Y1=(YYY-YMIN)/YD                                                          
c     IF(ABS(XX1-X1).GT.XW/2) CALL PLOT(X1,Y1,3)                                
c     IF(ABS(XX1-X1).LT.XW/2) CALL PLOT(X1,Y1,2)                                
c     IF(X1.LT.0.0.OR.X1.GT.XW) GO TO 50                                        
c     IF(Y1.LT.0.0.OR.Y1.GT.YW) GO TO 50                                        
c     CALL PLOT(X1,Y1,2)                                                        
c     IF(ABS(XX1-X1).GT.15..OR.IC4.EQ.0) THEN                                   
c     CALL PLOT(X1,Y1,3)                                                        
c     WRITE(9,9) FLN(I),FLT(I)                                                  
c     WRITE(9,9) xxx,FLT(I)                                                  
c     IF(IC2.NE.0) IC1(IC2)=IC3                                                 
c     IC2=IC2+1                                                                 
c     IC3=IC3+1                                                                 
c     IC4=1                                                                     
c     ELSE                                                                      
c     CALL PLOT(X1,Y1,2)                                                        
c     WRITE(9,9) FLN(I),FLT(I)                                                  
c     WRITE(9,9) xxx,FLT(I)                                                  
c     IC3=IC3+1                                                                 
c     END IF                                                                    
c     XX1=X1                                                                    
c     GO TO 40                                                                  
c  50 CALL PLOT(X1,Y1,3)                                                        
c     IC4=0                                                                     
c     XX1=X1                                                                    
c  40 CONTINUE                                                                  
c  30 CONTINUE                                                                  
c     GO TO 10                                                                  
c  20 CONTINUE                                                                  
c     IF(IC2.NE.0) IC1(IC2)=IC3                                                 
c     WRITE(6,*) IC2                                           
c     WRITE(9,8) IC2,(IC1(I),I=1,IC2)                                           
c   8 FORMAT(I10)                                                               
c     close(1)
c     RETURN                                                                    
c     END                                                                       
