S&P, Nasdaq climb 1 percent; Merck, Amazon lead