program hotrotinhoc;
var a: array[1..32000] of integer;
d,d1,a1,i,n: integer;
begin
write('a='); readln(a1);
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
d:=0; d1:=0;
for i:=1 to n do
begin
if a[i]>a1 then inc(d);
if a[i]<a1 then inc(d1);
end;
writeln('Co ',d,' phan tu lon hon ',a);
write('Co ',d1,' phan tu be hon ',a);
readln
end.