Fitting distributions to given data or known quantiles