sentence1: The Keita dynasty ruled Mali , pre-imperial and imperial , from the early 17th to the 12th century .
sentence2: The Keita dynasty ruled pre-imperial and imperial Mali from the 12th century into the early 17th century .