Determine all pairs $(x, y)$ of positive integers with $y \vert x^2 +1$ and $x^2 \vert y^3 +1$.
To determine all pairs \((x, y)\) of positive integers such that \(y \mid x^2 + 1\) and \(x^2 \mid y^3 + 1\), we will analyze the given conditions step-by-step.

1. **Case 1: \(y = x\)**

   If \(y = x\), then we need to check if both conditions hold:
   - \(y \mid x^2 + 1\) becomes \(x \mid x^2 + 1\). This is always true because \(x \mid x^2\) and \(x \mid 1\) (since \(x\) is a positive integer).
   - \(x^2 \mid y^3 + 1\) becomes \(x^2 \mid x^3 + 1\). This is not generally true for all \(x\). We need to check specific values:
     - For \(x = 1\), \(1^2 \mid 1^3 + 1\) which is \(1 \mid 2\), true.
     - For \(x > 1\), \(x^2 \mid x^3 + 1\) is not true because \(x^2\) does not divide \(x^3 + 1\) unless \(x = 1\).

   Therefore, the only solution in this case is \((x, y) = (1, 1)\).

2. **Case 2: \(y \leq x - 1\)**

   We need to check if \(y \leq x - 1\) can satisfy both conditions:
   - From \(x^2 \mid y^3 + 1\), we have \(y^3 + 1 = kx^2\) for some integer \(k\).
   - From \(y \mid x^2 + 1\), we have \(x^2 + 1 = my\) for some integer \(m\).

   Combining these, we get:
   \[
   y^3 + 1 = kx^2 \quad \text{and} \quad x^2 + 1 = my
   \]
   Substituting \(x^2 = my - 1\) into \(y^3 + 1 = kx^2\), we get:
   \[
   y^3 + 1 = k(my - 1)
   \]
   Simplifying, we get:
   \[
   y^3 + 1 = kmy - k
   \]
   \[
   y^3 + k = kmy
   \]
   \[
   y^3 + k = kmy
   \]
   This equation is difficult to solve directly, so we will consider specific values of \(y\).

   - For \(y = 1\), \(x^2 \mid 1^3 + 1 = 2\). This implies \(x^2 \mid 2\), so \(x = 1\).
   - For \(y = 2\), \(x^2 \mid 2^3 + 1 = 9\). This implies \(x^2 \mid 9\), so \(x = 1\) or \(x = 3\). However, \(2 \mid 1^2 + 1 = 2\) is true, and \(2 \mid 3^2 + 1 = 10\) is also true.

   Therefore, the solutions in this case are \((x, y) = (1, 2)\) and \((x, y) = (3, 2)\).

3. **Case 3: \(y \geq x + 1\)**

   Let \(y_1 = \frac{x^2 + 1}{y}\) and \(x_1 = x\). This case reduces to Case 2 because \(y_1 \leq x - 1\).

Combining all cases, the pairs \((x, y)\) that satisfy the conditions are:
\[
(x, y) = (1, 1), (1, 2), (3, 2)
\]

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