Sayyiduna Jabir (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "When a newborn child cries (cries out), the funeral prayer is offered over him, he inherits, and he is also inherited from."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6784