A simple program for calculating maximum relative distance.