Beauregard inherited $1,000,000. He invested part of the money in a thoroughbred horse-breeding farm and the rest in a polo club. If Beauregard earns 12% on the farm and 2% on the polo club, for a combined profit of $50,000, how much did he invest in the farm?