Let $f,g: \mathbf{R} \to \mathbf{R}$ be two strictly increasing continuous functions such that, for all $a,b,c,d\in \mathbf{R}$, it holds $$ f(a)+f(b)=f(c)+f(d) $$ if and only if $$ \forall h \in \mathbf{R},\,\, g(a+h)+g(b+h)=g(c+h)+g(d+h). $$
Is it true that $f$ and $g$ have to be necessarily (both) linear?
(Clearly, it can be assumed without loss of generality that $f(0)=g(0)=0$ and $f(1)=g(1)=1$. Hence the claim can be rewritten as $f(t)=g(t)=t$ for all $t$.)