Two towns in Scotland have been named the cheapest places for first-time buyers to get on the property market in the UK.