Calculates the mean and median of input numbers