import std.stdio; import std.algorithm; import std.range; import std.bigint; void main(string[] args) { auto input = readln.splitter.map!(BigInt).array; auto a = input[0] + input[1], b = input[0] * input[1]; if (a < b) { swap(a, b); } while (b) { immutable t = a % b; a = b; b = t; } writeln(a); }