Capital Gains Qualification

if I rent a property, but don't own it for three years, then buy it and sell it a year later do I pay capital gains?