Jax bought exactly enough trees to plant eight equal rows. Then one tree died and couldn't be planted, but he still had enough trees left to plant exactly nine equal rows. After that, two trees were stolen, but he still had enough trees left to plant exactly ten equal rows. If he bought the least number of trees satisfying these three conditions, how many trees did he buy?