S&P 500, Nasdaq hit two-week highs on megacap boost