      program pp
      dimension xx(70000),yy(70000)
      dimension ic(2000),ia(2000)
      open(1,file='w1.pp.data')
      open(2,file='w1.pp2.data')
      open(3,file='w1.br.data')
      n=0
   10 read(1,*,end=20) y,x
      if(x.lt.0.0) x=x+360
      n=n+1
      xx(n)=x
      yy(n)=y
    1 format(2f10.3)
      go to 10
   20 continue
      n1=0
      n2=0
   30 read(3,*,end=40) i1
      n1=n1+1
      ic(n1)=i1
      n2=n2+i1
      go to 30
   40 continue
      write(6,*) n,n1,n2
      n3=0
      n2=0
      do i=1,n1
      n2=n2+1
      do j=2,ic(i)
      n2=n2+1
      if(abs(xx(n2)-xx(n2-1)).gt.180) then
      n3=n3+1
      write(6,*) i,j,n2,ic(i),xx(n2),xx(n2-1)
      end if
      end do
      end do
      n2=0
      do i=1,n1
      do j=1,ic(i)
      n2=n2+1
      if(i.gt.750.and.i.lt.780) then
      if(xx(n2).lt.180.) xx(n2)=360
      end if
      write(2,1) yy(n2),xx(n2)
      end do
      end do
      stop
      end
