       real*8 rr, bb, gg, fl1, fl2
       integer x, y, z, w, q

       dimension a(1)
       dimension b(10000000)
       dimension c(10000000)
       dimension d(10000000)
       dimension e(10000000)


       open (1,file='nono')
       read (1,*) (a(x), x=1, 1)

       n = a(1)

       open (2,file='time')
       read (2,*) (b(y), y=1, n)

       open (3,file='fluxr')
       read (3,*) (c(z), z=1, n)

       open (4,file='fluxg')
       read (4,*) (d(w), w=1, n)

       open (5,file='fluxb')
       read (5,*) (e(q), q=1, n)

 
       rr = 0.0
       do i=1, n
       rr = rr + c(i)
       end do
       rr = rr/n

       gg = 0.0
       do i=1, n
       gg = gg + d(i)
       end do
       gg = gg/n
c       fl1 = rr/gg

       bb = 0.0
       do i=1, n
       bb = bb + e(i)
       end do
       bb = bb/n
       fl1 = bb/rr
       fl2 = bb/gg
       write (10,*) fl1
       write (10,*) bb
       do i=1, n
       write (7,*) b(i), c(i)*fl1
       write (8,*) b(i), d(i)*fl2
       write (9,*) b(i), e(i)
       end do
       end 

