Observation of Knudsen and Gurzhi transport regimes in a two-dimensional wire