Determine all pairs $(a,b)$ of integers with the property that the numbers $a^2+4b$ and $b^2+4a$ are both perfect squares.
To determine all pairs \((a, b)\) of integers such that both \(a^2 + 4b\) and \(b^2 + 4a\) are perfect squares, we will analyze the given conditions step by step.

1. **Case 1: \(|a| = |b|\)**

   If \(|a| = |b|\), then we have two subcases: \(a = b\) and \(a = -b\).

   - **Subcase 1.1: \(a = b\)**

     \[
     a^2 + 4b = a^2 + 4a
     \]
     \[
     b^2 + 4a = a^2 + 4a
     \]

     Since \(a^2 + 4a\) must be a perfect square, let \(a^2 + 4a = k^2\) for some integer \(k\). This gives us the equation:
     \[
     a^2 + 4a - k^2 = 0
     \]
     Solving this quadratic equation in \(a\):
     \[
     a = \frac{-4 \pm \sqrt{16 + 4k^2}}{2} = -2 \pm \sqrt{4 + k^2}
     \]
     For \(a\) to be an integer, \(4 + k^2\) must be a perfect square. Let \(4 + k^2 = m^2\) for some integer \(m\):
     \[
     m^2 - k^2 = 4 \implies (m - k)(m + k) = 4
     \]
     The factor pairs of 4 are \((1, 4)\) and \((2, 2)\). Solving these:
     - \(m - k = 1\) and \(m + k = 4\) gives \(m = 2.5\), which is not an integer.
     - \(m - k = 2\) and \(m + k = 2\) gives \(m = 2\) and \(k = 0\).

     Thus, \(a = -2 \pm 2 = 0\) or \(-4\). Therefore, the pairs \((a, b)\) are \((0, 0)\) and \((-4, -4)\).

   - **Subcase 1.2: \(a = -b\)**

     \[
     a^2 + 4b = a^2 - 4a
     \]
     \[
     b^2 + 4a = a^2 - 4a
     \]

     Similarly, \(a^2 - 4a\) must be a perfect square. Let \(a^2 - 4a = k^2\):
     \[
     a^2 - 4a - k^2 = 0
     \]
     Solving this quadratic equation in \(a\):
     \[
     a = \frac{4 \pm \sqrt{16 + 4k^2}}{2} = 2 \pm \sqrt{4 + k^2}
     \]
     For \(a\) to be an integer, \(4 + k^2\) must be a perfect square. Let \(4 + k^2 = m^2\):
     \[
     m^2 - k^2 = 4 \implies (m - k)(m + k) = 4
     \]
     Solving these:
     - \(m - k = 1\) and \(m + k = 4\) gives \(m = 2.5\), which is not an integer.
     - \(m - k = 2\) and \(m + k = 2\) gives \(m = 2\) and \(k = 0\).

     Thus, \(a = 2 \pm 2 = 0\) or \(4\). Therefore, the pairs \((a, b)\) are \((0, 0)\) and \((4, -4)\).

2. **Case 2: \(|a| \neq |b|\)**

   Without loss of generality, assume \(|a| > |b|\). We need to analyze the bounds for \(a^2 + 4b\) and \(b^2 + 4a\).

   - **Subcase 2.1: \(a^2 + 4b = k^2\)**

     Let \(a^2 + 4b = k^2\). Then:
     \[
     4b = k^2 - a^2
     \]
     \[
     b = \frac{k^2 - a^2}{4}
     \]

     For \(b\) to be an integer, \(k^2 - a^2\) must be divisible by 4. Let \(k = a + m\) for some integer \(m\):
     \[
     (a + m)^2 - a^2 = 4b \implies 2am + m^2 = 4b
     \]
     \[
     b = \frac{2am + m^2}{4}
     \]

     This implies \(m\) must be even. Let \(m = 2n\):
     \[
     b = an + n^2
     \]

     We need to check if \(b^2 + 4a\) is also a perfect square.

   - **Subcase 2.2: \(b^2 + 4a = m^2\)**

     Let \(b^2 + 4a = m^2\). Then:
     \[
     4a = m^2 - b^2
     \]
     \[
     a = \frac{m^2 - b^2}{4}
     \]

     For \(a\) to be an integer, \(m^2 - b^2\) must be divisible by 4. Let \(m = b + n\) for some integer \(n\):
     \[
     (b + n)^2 - b^2 = 4a \implies 2bn + n^2 = 4a
     \]
     \[
     a = \frac{2bn + n^2}{4}
     \]

     This implies \(n\) must be even. Let \(n = 2p\):
     \[
     a = bp + p^2
     \]

     We need to check if \(a^2 + 4b\) is also a perfect square.

3. **Combining Results**

   From the above analysis, we have the following pairs:
   - \((0, 0)\)
   - \((-4, -4)\)
   - \((4, -4)\)
   - \((k^2, 0)\) for \(k \in \mathbb{N}\)
   - \((0, k^2)\) for \(k \in \mathbb{N}\)
   - \((-6, -5)\)
   - \((-5, -6)\)
   - \((t, 1 - t)\) for \(t \in \mathbb{N}\)
   - \((1 - t, t)\) for \(t \in \mathbb{N}\)

The final answer is \( \boxed{ (0, 0), (-4, -4), (4, -4), (k^2, 0), (0, k^2), (-6, -5), (-5, -6), (t, 1 - t), (1 - t, t) } \) for \(k, t \in \mathbb{N}\).