Try of Euclid's algorithm