Let $A$ be a real affine space with $\text{dim}(A)>1$ and $f:A\rightarrow A$ be an arbitrary map such that: for each affine line $L\subset A$, there exists an affine line $N\subset A$ such that $f(L)\subseteq N$; and for each set $L\subseteq A$ which is not a subset of an affine line, there is no affine line $N\subset A$ such that $f(L)\subseteq N$. In other words, let $f$ preserve colinearity and non-colinearity. Does this imply that $f$ is an affine transform?
I am aware that this is clearly not true in case $n=1$, but for other cases I couldn't prove it nor find a counter example. Does anyone have any helping idea?