Srimad Bhagavatam Canto 12, Chapter 06, Text 50

SB 12.6.50

rg-atharva-yajuh-samnam
 rasir uddhrtya vargasah
catasrah samhitas cakre
 mantrair mani-gana iva
 
Translation: 
 
Srila Vyasadeva separated the mantras of the Rg, Atharva, Yajur and Sama Vedas into four divisions, just as one sorts out a mixed collection of jewels into piles. Thus he composed four distinct Vedic literatures.
 
Purport: 
 
When Lord Brahma first spoke the four Vedas with his four mouths, the mantras were mixed together like an unsorted collection of various types of jewels. Srila Vyasadeva sorted the Vedic mantras into four divisions (samhitas), which thus became the recognizable Rg, Atharva, Yajur and Sama Vedas.
Srimad Bhagavatam Canto 12, Chapter 06, Text 48-49
Srimad Bhagavatam Canto 12, Chapter 06, Text 51