import std.conv; import std.stdio; import std.string; import std.numeric; import std.algorithm; import std.array; void main() { int[] t; foreach (_; 0..3) { t ~= to!int(readln.strip); } int lcm = lcm(lcm(t[0], t[1]), t[2]); int[] nr = t.map!(ti => lcm / ti).array; int q = gcd(nr[0] - nr[2], nr[1] - nr[2]); int g = gcd(lcm, q); writef("%s/%s\n", lcm/g, q/g); } int lcm(int a, int b) { int g = gcd(a, b); int na = a / g; int nb = b / g; return na * nb * g; }