Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said: The Prophet (peace and blessings be upon him), Sayyiduna Usamah bin Zayd, Sayyiduna Uthman bin Talhah and Sayyiduna Bilal (may Allah be pleased with them) entered the Ka'bah, closed the door and stayed inside. When they came out, I asked Sayyiduna Bilal (may Allah be pleased with him): What did the Prophet (peace and blessings be upon him) do? He said: He (peace and blessings be upon him) placed one pillar to his left, two to his right and three pillars behind him, and then prayed. In those days the Ka'bah stood on six pillars. [Sahih: Bukhari: 483, Muslim: 1329]
Imam Muslim (may Allah have mercy on him) narrated it from Yahya bin Yahya, except that he said: He placed two pillars to his left.
Likewise Imam al-Shafi'i (may Allah have mercy on him), narrating from Imam Malik (may Allah have mercy on him), said this in one place, and in another place he said: one pillar to his right and one pillar to his left.
Likewise Abdullah bin Yusuf (may Allah have mercy on him) narrated it from Imam Malik (may Allah have mercy on him), and Abu Dawud (may Allah have mercy on him) through al-Qa'nabi (may Allah have mercy on him) from Imam Malik (may Allah have mercy on him); while Ibn Abi Uways (may Allah have mercy on him) and Yahya bin Bukayr (may Allah have mercy on him) narrated it from Imam Malik (may Allah have mercy on him) as we have narrated it.
Likewise Abd al-Rahman bin Mahdi (may Allah have mercy on him) narrated from Imam Malik (may Allah have mercy on him): two pillars to his right and one pillar to his left; and this is what is correct.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9719