Clastic sediments and the rocks they produce (e.g. sandstones, mudstones) are primarily classified according to: