Find all primes that can be written both as a sum and as a difference of two primes (note that $ 1$ is not a prime).
1. **Consider the problem statement**: We need to find all primes \( p \) that can be written both as a sum and as a difference of two primes. 

2. **Set up the equations**: Let \( p \) be a prime such that:
   \[
   p = x + y \quad \text{and} \quad p = z - w
   \]
   where \( x, y, z, w \) are primes.

3. **Consider the case \( p > 2 \)**: Since \( p \) is a prime greater than 2, it must be odd. This is because the only even prime is 2, and 2 cannot be written as a difference of two primes (since the difference of two primes would be at least 1).

4. **Analyze modulo 2**: Since \( p \) is odd, one of \( x \) or \( y \) must be 2 (the only even prime), and the other must be odd. Similarly, one of \( z \) or \( w \) must be 2, and the other must be odd.

5. **Assign values**: Without loss of generality, assume \( x = 2 \). Then:
   \[
   p = 2 + y \implies y = p - 2
   \]
   Since \( y \) must be a prime, \( p - 2 \) must also be a prime.

6. **Consider the difference equation**: Similarly, assume \( w = 2 \). Then:
   \[
   p = z - 2 \implies z = p + 2
   \]
   Since \( z \) must be a prime, \( p + 2 \) must also be a prime.

7. **Check for small primes**: We need to find primes \( p \) such that both \( p - 2 \) and \( p + 2 \) are primes.
   - For \( p = 3 \):
     \[
     p - 2 = 1 \quad (\text{not a prime})
     \]
   - For \( p = 5 \):
     \[
     p - 2 = 3 \quad (\text{prime}), \quad p + 2 = 7 \quad (\text{prime})
     \]
   - For \( p = 7 \):
     \[
     p - 2 = 5 \quad (\text{prime}), \quad p + 2 = 9 \quad (\text{not a prime})
     \]

8. **Verify the solution**: The only prime \( p \) that satisfies both conditions is \( p = 5 \).

The final answer is \(\boxed{5}\).