Program salaries;
uses crt;
var F:text;max,salary:word;name:string[50];sex:0..1;
begin
max:=0;
assign(F,'C:\FPC\2.4.0\bin\i386-win32\salary.txt');reset(F);
repeat
readln(F,name,sex,salary);
if (sex=1) and (salary>max) then max:=salary;
until eof(F);
clrscr;close(F);
writeln;
writeln('The highest ladies salary is: ',max);
writeln('Press ENTER for exit.');
readln;
end.