The Messenger of Allah ﷺ said, "Allah wrote a book two thousand years before He created the heavens and the earth, and from it He sent down two verses with which He concluded Surah al-Baqarah. They are not recited in any house for three nights without Satan keeping away from it."
أن رسول الله ﷺ قال: إن الله كتب كتابا قبل أن يخلق السموات والأرض بألفي عام، فأنزل منه آيتين فختم بهما سورة البقرة، فلا يقرآن في دار ثلاث ليال فيقربها الشيطان.
Tirmidhi (2882), Ahmad (18414), and Ibn Dirays (167) narrated it, and Ibn Hibban (782) and Hakim (1/562) graded it sahih, all of them from the hadith of Hammad bin Salama, from Ashath bin Abdul-Rahman Jarmi, from Abu Qilaba, from Abu Ashath Sanani, from Numan bin Bashir, who narrated it. The wording given is Ahmad's.Tirmidhi said, "Hasan gharib."I say, this is indeed so, for the chain contains Ashath bin Abdul-Rahman Jarmi, whose hadith is hasan. See for more, Kitab Qadr.However, Mustaghfiri narrated it in Fadail Quran (734) with a different chain, in which it says, "Whoever recites them in his house, Satan will not enter his house for three days." This chain contains Abu Qahdham Nadr bin Mabad, who is daif.