Apple and Amazon deliver rally on Wall Street