A relation between tree amplitudes of closed and open strings