Market ends flat after early gains; Nifty below 25,200