The football league of a certain country is played according to the following rules:
1) Each team plays exactly one game against each of the other teams.
2) The winning team of each game is awarded 1 point and the losing team gets 0 points.
3) If a match ends in a draw, both the teams get half a point.
After the league was over, the teams were ranked according to the points that they had earned at the end of the tournament. Analysis of the points table revealed the following:
a) Exactly half of the points earned by each team were earned in games against the ten teams which finished at the bottom of the table.
b) Each of the bottom ten teams earned half of their total points against the other nine teams in the bottom ten.
How many teams participated in the league?