Question 134
Let $\mathcal{S}$ be the set of all points in the plane. Find all functions $f: \mathcal{S} \rightarrow \mathbb{R}$ such that for all nondegenerate triangles $A B C$ with orthocenter $H$, if $f(A) \leq f(B) \leq f(C)$, then
$$
f(A)+f(C)=f(B)+f(H)
$$
$$
f(A)+f(C)=f(B)+f(H)
$$