For each natural number $a$ we denote $\tau (a)$ and $\phi (a)$ the number of natural numbers dividing $a$ and the number of natural numbers less than $a$ that are relatively prime to $a$. Find all natural numbers $n$ for which $n$ has exactly two different prime divisors and $n$ satisfies $\tau (\phi (n))=\phi (\tau (n))$.
Given the problem, we need to find all natural numbers \( n \) such that \( n \) has exactly two different prime divisors and satisfies the equation \(\tau(\phi(n)) = \phi(\tau(n))\).

1. **Express \( n \) in terms of its prime factors:**
   Let \( n = p^a q^b \), where \( p \) and \( q \) are distinct primes and \( a, b \in \mathbb{N} \).

2. **Calculate \(\phi(n)\) and \(\tau(n)\):**
   \[
   \phi(n) = p^{a-1} q^{b-1} (p-1)(q-1)
   \]
   \[
   \tau(n) = (a+1)(b+1)
   \]

3. **Set up the given equation:**
   \[
   \tau(\phi(n)) = \phi(\tau(n))
   \]
   Substituting the expressions for \(\phi(n)\) and \(\tau(n)\):
   \[
   \tau(p^{a-1} q^{b-1} (p-1)(q-1)) = \phi((a+1)(b+1))
   \]

4. **Consider the cases for \( p \) and \( q \):**

   **Case 1: Both \( p \) and \( q \) are odd primes.**
   - Since \((p-1)(q-1)\) is divisible by 4, \(\tau(p^{a-1} q^{b-1} (p-1)(q-1)) \geq \tau(4 p^{a-1} q^{b-1}) = 3ab\).
   - However, \(\phi((a+1)(b+1)) < (a+1)(b+1)\), so \(3ab < (a+1)(b+1)\).
   - This implies \(2ab \leq a + b\), which is only possible when \(a = b = 1\).
   - The equation becomes \(\tau((p-1)(q-1)) = \tau(4)\).
   - Since \((p-1)(q-1)\) is divisible by 4, \(\tau((p-1)(q-1)) \geq \tau(4)\), equality holds if \((p-1)(q-1) = 4\).
   - This implies \(p = 3\) and \(q = 3\), which contradicts the assumption that \(p\) and \(q\) are different.

   **Case 2: \( p = 2 \) and \( q \) is an odd prime.**
   - The equation becomes:
     \[
     \tau(2^{a-1} q^{b-1} (q-1)) = \phi((a+1)(b+1))
     \]
   - Since \((a+1)(b+1)\) is not a prime, \(\phi((a+1)(b+1)) \leq \frac{(a+1)(b+1)}{2}\).
   - Also, \(\tau(2^{a-1} q^{b-1} (q-1)) > \tau(2^{a-1} q^{b-1}) = ab\).
   - Thus, \(\frac{(a+1)(b+1)}{2} > ab\), or \((a-1)(b-1) < 2\).

   **Subcase 2.1: \( a = b = 2 \)**
   - The equation becomes \(\tau(2q(q-1)) = \phi(9)\).
   - But \(\tau(2q(q-1)) > \tau(2q) = 4\) and \(\phi(9) = 3\), leading to a contradiction.

   **Subcase 2.2: \( a = 1 \)**
   - The equation becomes \(\tau(q^{b-1}(q-1)) = \phi(2(b+1))\).
   - Since \(\phi(2(b+1)) \leq b+1\) and \(\tau(q^{b-1}(q-1)) \geq \tau(2q^{b-1}) = 2b\), we get \(b+1 \leq 2b\).
   - The only possibility is \(b = 1\), and equality must hold everywhere, hence \(q^{b-1}(q-1) = 2q^{b-1}\), which gives \(q = 3\).
   - Therefore, \(n = 2^1 3^1 = 6\), which is indeed a solution.

   **Subcase 2.3: \( b = 1 \)**
   - The equation becomes \(\tau(2^{a-1}(q-1)) = \phi(2(a+1))\).
   - Suppose \(q > 3\). If \(q-1\) is divisible by 4, then \(\tau(2^{a-1}(q-1)) \geq \tau(2^{a+1}) = a+2\), but \(\phi(2(a+1)) \leq a+1\), a contradiction.
   - If \(q-1\) is not divisible by 4, then it has an odd prime divisor \(r\), therefore \(\tau(2^{a-1}(q-1)) \geq \tau(2^a r) = 2(a+1)\), hence \(\phi(2(a+1)) \geq 2(a+1)\), which is impossible.
   - Now suppose \(q = 3\), then \(\tau(2^a) = \phi(2(a+1))\), so \(a+1 = \phi(2(a+1))\), which implies that \(2(a+1)\) is a power of 2.
   - Hence \(a = 2^k - 1\), and we get \(n = 2^{2^k-1} 3\), which is indeed another solution. Also note that the previous answer is also of this form: \(2^{2^1-1} 3 = 6\).

Conclusion:
The natural numbers \( n \) that satisfy the given conditions are of the form \( 3 \cdot 2^{2^k-1} \) with \( k \in \mathbb{N} \).

The final answer is \( \boxed{ 3 \cdot 2^{2^k-1} } \) with \( k \in \mathbb{N} \).