Sensex and Nifty rise on foreign fund inflows and U.S. market trends, with Sensex climbing 372.51 points