Sensex, Nifty end in the green after days of decline as investors snap up stocks on value buying, blue-chip rally