a) Without loss of generality, we may suppose 1≤m<n.
If m and n are odd, then m≥1 and n≥3. Taking d1=1 and d2=n yields d1+d2=n+1, which is an even number at least 4, so it is composite, contradiction.
If m and n are even, taking d1=2 and d2=2 yields d1+d2=4, contradiction.
In conclusion m and n have different parities, so m+n is odd.
b) If m=n, then d1=m and d2=n leads to d1+d2=2m, which must be a prime, hence m=n=1.
If m<n, then m=n and, from a), m and n have different parities.
* If m is even and n is odd, then m≥2 and n≥3. Then d1=1 and d2=n yields d1+d2=n+1≥4, contradiction.
* If m is odd and n is even, then m≥1 and n≥2. Take a∈N∗ and b odd such that n=2a⋅b.
I. If a≥3, then 8 divides n and, taking d1=1 and d2=8 yields d1+d2=9, contradiction.
II. If a=1, then n=2b, with odd b.
i) If b≥3, then take d1=1 and d2=b to get d1+d2=b+1≥4, contradiction.
ii) If b=1, then n=2 and, since m<n and m is odd, m=1. It is easy to check that the pair (m,n)=(1,2) is a solution.
III. If a=2, then n=4b, with odd b.
i) If b≥3, then d1=1 and d2=b yields d1+d2=b+1≥4, contradiction.
ii) If b=1, then n=4 and, since m<n and m is odd, m∈{1,3}. It is easy to check that only (m,n)=(1,4) satisfies the statement.
Finally, the solutions are (1,1), (1,2), (1,4).