program XetHang;
var
N: Integer;
K: Real;
i, Count1, Count2, Count3: Integer;
Score: array of Real;
begin
AssignFile(Input, 'XETHANG.INP');
Reset(Input);
ReadLn(N, K);
SetLength(Score, N);
for i := 0 to N - 1 do
Read(Score[i]);
CloseFile(Input);
Count1 := 0;
for i := 0 to N - 1 do
begin
if Score[i] > K then
begin
WriteLn('Pha ky luc diem!');
WriteLn('Diem vuot ky luc: ', Score[i] - K:0:2);
Exit;
end;
end;
WriteLn('Khong pha ky luc diem!');
Count1 := 0;
Count2 := 0;
Count3 := 0;
for i := 0 to N - 1 do
begin
if Score[i] = K then
Inc(Count1)
else if Score[i] = K - 1 then
Inc(Count2)
else if Score[i] = K - 2 then
Inc(Count3);
end;
AssignFile(Output, 'XETHANG.OUT');
Rewrite(Output);
WriteLn(Count1, ' hoc sinh dat hang Nhat');
WriteLn(Count1, ' diem: ', K:0:2);
WriteLn(Count2, ' hoc sinh dat hang Nhi');
WriteLn(Count2, ' diem: ', K - 1:0:2);
WriteLn(Count3, ' hoc sinh dat hang Ba');
WriteLn(Count3, ' diem: ', K - 2:0:2);
CloseFile(Output);
end.