Capital Gains

Can I use capital gains from a rental house sale to pay off the mortgage on another rental house?