read x, y; a := x; b := y; while a <> b do if a < b then b := b - a else a := a - b fi end; z := a; write z.