program pil_5_52(input, output);
var 
	a, b, c, d, i : integer;
	flg : boolean;
begin
	read(a,b,c,d);
	flg:=false;
	for i:=1 to abs(d) div 2 do
		if d mod i=0 then
		begin
			if (sqr(i)*(a*i+b)+c*i+d=0) then begin writeln(i); flg:=true; end;
			if (sqr(i)*(b-a*i)-c*i+d=0) then begin writeln(-i); flg:=true; end;
		end;
	{proverka d i -d}
	if (sqr(d)*(a*d+b)+c*d+d=0) then begin writeln(d); flg:=true; end;
	if (sqr(d)*(b-a*d)-c*d+d=0) then begin writeln(-d); flg:=true; end;
	if not flg then writeln('Resheniy net.');
end.
