Volume 3 · Book 46 · Hadith 697
Narrated Ibn 'Umar: The Prophet said, "Whoever manumits a slave owned by two masters, should manumit him completely (not partially) if he is rich after having its price evaluated."
— Sahih Bukhari, Volume 3, Book 46: Manumission of Slaves, Hadith #697