English: Animation of the Euclidean algorithm for 1071 and 462. The initial green rectangle has dimensions a = 1071 and b = 462. Square 462x462 tiles are added until a green 462x147 rectangle remains. This is tiled with square 147x147 tiles until a 21x147 rectangle remains. This third rectangle is tiled with 21x21 square tiles, leaving no remainder. Thus, 21 is the greatest common divisor of 1071 and 462.