Size effects on heat transport in small systems : Dynamical phase transition from diffusive to ballistic regime