program z3;
type
TRect = packed record
X1, Y1, X2, Y2: Integer;
end;
var
f: file of TRect;
R: TRect;
begin
Assign(f, 'rectfile.dat');
Reset(f);
while not EOF(f) do
begin
Read(f, R);
{ строишь проямоугольник (R.X1, R.Y1, R.X2, R.Y2) }
end;
Close(f);
end.