input => partition