The distance between Earth and Mars is the smallest since the 10th century.