        implicit real*8 (a-h,o-z)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*)
        read(*,*) m,e10,e20,e30,e40
        print*, m,',',0.,',',0.,',',0.,',',0.
        open(7,file='tate1')
        open(8,file='tate2')
        open(9,file='yoko1')
        open(10,file='yoko2')
        do i=1,259543-1
         read(*,*) m,e1,e2,e3,e4
        write(7,*) m,e1-e10
        write(8,*) m,e2-e20
        write(9,*) m,e3-e30
       write(10,*) m,e4-e40
         print*, m,',',e1-e10,',',e2-e20,',',e3-e30,',',e4-e40
        end do
        close(7)
        close(8)
        close(9)
        close(10)
        end
