const a=10;
var x,y,z,w,k,dx,dy;
begin
  k:=1;
  display(400);
  dx:=20;
  dy:=20;
  x:=200;
  y:=100;
  while 1=1 do begin
    color(k);
    k:=k+1;
    if k=5 then k:=1;
    w:=-30;
    while w<60 do begin
      z:=-30;
      while z<60 do begin
        if z*z + w*w < 1000 then
          draw(x+z,y+w);
        z:=z+1;
      end;
      w:=w+1;
    end;
    x:=x+dx;
    y:=y+dy;
    if x=400 then dx:=-dx;
    if x=0 then dx:=-dx;
    if y=400 then dy:=-dy;
    if y=0 then dy:=-dy;
  end;
end.
