import std.algorithm, std.array, std.conv, std.stdio; void main() { auto AB = readln.split.to!(long[]); auto r = AB[1] % 3; if (r == 0) writeln("0 ", AB[0]); else if (r == 1) writeln(AB[0], " 0"); else writeln(-AB[0], " ", -AB[0]); }