Valid sales cost adjustment for inherited investment property

I sold an inherited property last year and received a 1099-S that shows the complete sale price, with no adjustments for sales costs.  My sales costs included realtor commission, escrow fee, and title insurance.  Can I adjust my capital gain by the sum of these sales costs?  The property sat empty for the previous 3 years.