Rectangle Covered with Squares#5155

Rectangle Covered with Squares

1 segundo
64 megabytes
Fácil

Given a rectangle with integer sides and , find the largest possible side length of identical squares such that the rectangle can be completely covered by these squares, with none of the squares extending beyond the boundaries of the rectangle.

\InputFileTwo natural numbers and (0 < a,\ b < 2\ 000\ 000\ 000).

\OutputFileOutput a single integer—the side length of the square.

Ejemplos

Ejemplo 1

Loading
Loading