INSIDE EUCLID'S ALGORITHM