Let $\mathbb{N}=\{1,2,3, \ldots\}$ be the set of all positive integers. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that for any positive integers $a$ and $b$, the following two conditions hold:
(1) $f(a b)=f(a) f(b)$, and
(2) at least two of the numbers $f(a), f(b)$ and $f(a+b)$ are equal.

Proposed by: Fedir Yudin, Ukraine
Answer: $f(n)=a^{v_{p}(n)}$, where $a \in \mathbb{N}, p$ is a prime and $v_{p}(n)$ is the largest exponent of $p$ dividing $n$.
First, all such functions $f$ satisfy the conditions, as $v_{p}(a) \neq v_{p}(b)$ implies $v_{p}(a+b)=$ $\min \left(v_{p}(a), v_{p}(b)\right)$. Plugging $a, b=1$ into (1) gives $f(1)=1$. Also, a simple induction gives that $f\left(\prod_{i=1}^{k} p_{i}^{a_{i}}\right)=\prod_{i=1}^{k} f\left(p_{i}\right)^{a_{i}}$. Let $S$ be the set of all primes $p$ such that $f(p) \neq 1$. If $|S|=1$, then $S=\{p\}$ and $f(p)=a$ for some $a \neq 1$, and thus $f(n)=a^{v_{p}(n)}$ for all $n$. If $S=\emptyset$ then $f(n)=1$ for all $n$, which can be also written in the above form for $a=1$.

Now suppose that $S$ contains at least two primes. Let $p, q \in S$, and let $p^{t}=a q+b$ with $0 \leq b < q$. Since $p^{t-1} < p^{t}$, we have $a < p$, and thus $f(a)=1$. Therefore $a q$ is not divisible by $p$, thus neither is $b$, and since $b < q, f(b)=1$. Now using (2) for $a q$ and $b$ we get that some two of $f(a q)=f(a) f(q)=f(q)=f(p), f(b)=1$ and $f(a q+b)=f\left(p^{t}\right)=f(p)^{t}$ are equal, which is a contradiction.