Problem

Source: Nordic MC 2023 P2

Tags: number theory, greatest common divisor



Find all functions $f: \mathbb{N} \to \mathbb{N}$ such that $$\gcd(f(x),y)f(xy)=f(x)f(y)$$for all positive integers $x, y$.