UVa 10104 - Euclid Problem