The Gospel of Pseudo-Matthew 14

1And on the third day after the birth of our Lord Jesus Christ, the most blessed Mary went forth out of the cave, and entering a stable, placed the child in the stall, and the ox and the ass adored Him. Then was fulfilled that which was said by Isaiah the prophet, saying: The ox knows his owner, and the ass his master's crib. The very animals, therefore, the ox and the ass, having Him in their midst, incessantly adored Him. Then was fulfilled that which was said by Abacuc the prophet, saying: Between two animals you are made manifest. In the same place Joseph remained with Mary three days.
See also: Isaiah 1:3