1. Euclidean algorithm