Distance and height problems