<human>:  When was the Hagia Sophia (znik) built?
<bot>: The Hagia Sophia was built between 532 and 537. It was originally a church dedicated to the Virgin Mary, but later became a mosque after the Ottoman conquest of Istanbul.