Divide inputs into pieces.