What was the capital city before Korea split into two countries?

Hanseong, it's located right where modern day Seoul is.