How did the desert impact ancient Egyptian civilization?

A. It provided fertile farmland in Upper Egypt
B. It controlled flooding in the Nile Valley
C. It prevented invaders from attacking Egypt
D. It created excellent farmland in the Nile Valley