3. The company "Horns and Hooves" split into the company "Horns" and the company "Hooves" with different numbers of employees. The director of the company "Horns" receives the same salary as the director of the company "Hooves," and the average salary of all other employees of the company "Horns" matches the average salary of all other employees of the company "Hooves." In addition, the average salary of all employees of the company "Horns" matches the average salary of all employees of the company "Hooves." Which is greater: the director's salary or the average salary of all other employees?
Answer: The salary of the company director is equal to the average salary of all other employees.

Solution. Let the company "Horns" have $m$ employees, and the company "Hooves" have $n$ employees, with the directors' salaries being $x$ rubles, and the average salaries of the other employees being $y$ rubles. Then, the total salary of all employees in the company "Horns" is $y(m-1)+x$ rubles, and the total salary of all employees in the company "Hooves" is $x(n-1)+y$ rubles. By equating the average salaries of all employees, we get $\frac{y(m-1)+x}{m}=\frac{y(n-1)+x}{n}(*)$. After transformations, we arrive at the equality $n(x-y)=m(x-y)(* *)$. Given that $n \neq m$, it follows that $x=y$.