Maxim has been offered positions by two car dealers. The first company pays a salary of $\$ 10,000$ plus a commission of $\$ 1,000$ for each car sold. The second pays a salary of $\$ 20,000$ plus a commission of $\$ 500$ for each car sold. How many cars would need to be sold to make the total pay the same?