Find all pairs $(x, y)$ of natural numbers $x$ and $y$ such that $\frac{xy^2}{x+y}$ is a prime
To find all pairs \((x, y)\) of natural numbers such that \(\frac{xy^2}{x+y}\) is a prime number, we start by setting up the equation:

\[
\frac{xy^2}{x+y} = p
\]

where \(p\) is a prime number. This implies:

\[
xy^2 = p(x + y)
\]

Rearranging the equation, we get:

\[
xy^2 = px + py \implies xy^2 - px - py = 0
\]

We can factorize this equation by setting \(x = dm\) and \(y = dn\) where \(\gcd(m, n) = 1\). Substituting these into the equation, we get:

\[
d^3mn^2 = dmp + dnp \implies d^2mn^2 = p(m + n)
\]

Since \(p\) is a prime number, it must divide one of the factors on the left-hand side. We consider the following cases:

1. **Case 1: \(p \mid n\)**

   If \(p \mid n\), then \(p^2 \mid n^2\). This implies:

   \[
   p^2 \mid d^2mn^2 = p(m + n) \implies p \mid (m + n)
   \]

   However, since \(\gcd(m, n) = 1\), \(\gcd(n, m+n) = 1\), which is a contradiction. Therefore, \(p \nmid n\).

2. **Case 2: \(p \mid m\)**

   Let \(m = pk\). Substituting this into the equation, we get:

   \[
   d^2n^2pk = p(pk + n) \implies d^2n^2k = pk + n
   \]

   This implies \(k \mid n\). Since \(k \mid m\) and \(k \mid n\) and \(\gcd(m, n) = 1\), it follows that \(k = 1\). Therefore, \(m = p\). Substituting \(m = p\) into the equation, we get:

   \[
   d^2n^2 = p + n
   \]

   This implies \(n \mid p\). Since \(p\) is a prime number, \(n\) must be 1. Therefore, \(x = dp\) and \(y = d\). Substituting these into the original equation, we get:

   \[
   p + 1 = d^2 \implies p = (d-1)(d+1)
   \]

   Since \(p\) is a prime number, the only possible values are \(d-1 = 1\) and \(d+1 = p\). Therefore, \(d = 2\) and \(p = 3\). This gives us \(x = 6\) and \(y = 2\), which is indeed a solution.

3. **Case 3: \(p \mid d^2\)**

   If \(p \mid d^2\), then \(p \mid d\). Let \(d = pd_1\). Substituting this into the equation, we get:

   \[
   p^2d_1^2n^2m = m + n
   \]

   For \(n \geq 2\) and \(m \geq 1\), it is clear that \(LHS > RHS\). Therefore, either \(m = 1\) or \(n = 1\) must hold.

   - **Subcase 3.1: \(m = 1\)**

     We have:

     \[
     n + 1 = p^2d_1^2n^2 \implies n \leq 1
     \]

     Therefore, \(n = 1\). This implies \(x = y\). Substituting \(x = y\) into the original equation, we get:

     \[
     \frac{x^3}{2x} = \frac{x^2}{2} = p
     \]

     Therefore, \(x = y = p = 2\), which is indeed a solution.

   - **Subcase 3.2: \(n = 1\)**

     Similarly, we have \(m = 1\) and the same solution.

Therefore, the only solutions are \((x, y) \in \{(2, 2), (6, 2)\}\).

The final answer is \( \boxed{ \{(2, 2), (6, 2)\} } \).