In a tournament with 5 teams, there are no ties. In how many ways can the $\frac{5 \cdot 4}{2}=10$ games of the tournament occur such that there is neither a team that won all games nor a team that lost all games?