Nifty closes at 23,689, up 277 points or 1.18%, while Sensex gains 789 points or 1.06% to settle at 75,398