triangle idea for m-mean