select k min && median of medians