program celye(input,output);
var a,b,c,d,i,kd:integer;
begin
    write('vvedite koef. ur-niya:'); read(a,b,c,d);
    for i:=1 to trunc(sqrt(abs(d))) do
          if d mod i=0 then begin
             if a*i*sqr(i)+b*sqr(i)+c*i+d=0 then writeln('koren=',i);
             if -a*sqr(i)*i+b*sqr(i)-c*i+d=0 then writeln('koren=',-i);
             kd:=d div i;
             if a*sqr(kd)*kd+b*sqr(kd)+c*kd+d=0 then writeln('koren=',kd);
             if -a*sqr(kd)*kd+b*sqr(kd)-c*kd+d=0 then writeln('koren=',-kd)
             end

end.
