On January 1, 1981, Nick wins $150,000 in the lottery and he invests the entire amount...

On January 1, 1981, Nick wins $150,000 in the lottery and he invests the entire amount in two stocks, stock X and stock Y. At the end of 1981, he sells both stocks for a total profit of $30,000. If he earned 14% on stock X and 29% of stock Y, how much did he invest in each stock?