How Aristarchus deduced the distance to the moon