Problem

Source: Stars of Mathematics 2015 Senior Level #4

Tags: geometric inequality, inequalities



Let $S$ be a finite set of points in the plane,situated in general position(any three points in $S$ are not collinear),and let $$D(S,r)=\{\{x,y\}:x,y\in S,\text{dist}(x,y)=r\},$$where $R$ is a positive real number,and $\text{dist}(x,y)$ is the euclidean distance between points $x$ and $y$.Prove that $$\sum_{r>0}|D(S,r)|^2\le\frac{3|S|^2(|S|-1)}{4}.$$