       dimension a(1)
       dimension b(10000000)
       dimension c(10000000)
       dimension d(10000000)
       dimension e(10000000)
       integer x, y, z, q, w
       open (1,file='nnt')
       read (1,*) (a(x), x=1, 1)

       n = a(1)

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

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

       open (4,file='error')
       read (4,*) (d(q), q=1, n)
       
       open (5,file='flag')
       read (5,*) (e(w), w=1, n)

       do i=1, n
       if (e(i).eq.0) then
       write (9,*) b(i), c(i), d(i)
       else
       endif
       end do
       end
