Which of the following types of rocks are likely to be formed due to compacting and cementing?

Sedimentary rocks only
Igneous rocks only
Both sedimentary rocks and igneous rocks
Neither sedimentary rocks nor igneous rocks