House prices in Canada are still affordable, with the exception of Toronto and Vancouver, says a new study by BMO.

Millennials buying condos and townhouses in Toronto and Vancouver are responsible for those continual high prices. The sales and prices of detached homes are, however, softening in those two cities.

“Millennial buyers and international migrants are cushioning the decline in detached home prices in the hottest markets,” said Sal Guatieri, senior economist at BMO Capital Markets, in a press release. “We expect millennials to also bolster other markets like Montreal and Ottawa, as those looking for better affordability consider options beyond Toronto and Vancouver.”

Read: Canadian debt-to-income ratio declines in Q4

Other factors affecting national home prices include the lowest unemployment rates on record, the highest population growth in 25 years and historically low interest rates.

The Toronto Real Estate Board reported in February a drop of more than 12% of sale prices. The Office of the Superintendent of Financial Institutions introduced a stress test that came into effect on Jan. 1.

Also read: Toronto area home sales down 35%, Montreal up 5%

GTA luxury home sales down: report