Find all positive integer $n$ such that for all positive integers $ x $, $ y $, $ n \mid x^n-y^n \Rightarrow n^2 \mid x^n-y^n $. 
1. **Lemma Proof:**
   - Suppose \( n = AB \) where \(\gcd(A, B) = 1\) and \( n \) is a solution.
   - Assume \( A \) is not a solution. Then there exist \( x, y \) such that \( A \mid x^A - y^A \) but \( A^2 \nmid x^A - y^A \).
   - Consider \( (xB)^A - (yB)^A = B^A (x^A - y^A) \). Since \( A \mid x^A - y^A \), we have \( A \mid B^A (x^A - y^A) \).
   - However, \( A^2 \nmid B^A (x^A - y^A) \) because \( A^2 \nmid x^A - y^A \) and \( \gcd(A, B) = 1 \).
   - Therefore, \( n = AB \) cannot be a solution if \( A \) is not a solution. This proves the lemma.

2. **Prime Powers:**
   - By the lemma, it suffices to check prime powers only.

3. **Odd Primes \( p \):**
   - For \( n = p \):
     - Suppose \( p \mid x^p - y^p \). Then \( x^p \equiv y^p \pmod{p} \).
     - By Fermat's Little Theorem, \( x^p \equiv x \pmod{p} \) and \( y^p \equiv y \pmod{p} \).
     - Thus, \( x \equiv y \pmod{p} \), implying \( p \mid x - y \).
     - If \( p \mid x, y \), then \( v_p(x^p - y^p) \ge p \ge 3 \), so \( p^2 \mid x^p - y^p \).
     - If \( p \nmid x, y \), by Lifting The Exponent (LTE) lemma, \( v_p(x^p - y^p) = v_p(x - y) + v_p(p) = v_p(x - y) + 1 \ge 2 \), so \( p^2 \mid x^p - y^p \).

   - For \( n = p^k \) with \( k \ge 2 \):
     - Consider \( x = p + 1 \) and \( y = 1 \).
     - Then \( p \mid x - y \) and \( p \nmid x, y \).
     - By LTE, \( v_p(x^n - y^n) = v_p(x - y) + v_p(n) = v_p(x - y) + k = k + 1 \).
     - Thus, \( x^n - y^n \) is a multiple of \( n \), but not \( n^2 \).

4. **Prime \( p = 2 \):**
   - For \( n = 2 \):
     - \( 2 \mid x^2 - y^2 \) implies \( x, y \) have the same parity.
     - Thus, \( 2 \mid x - y \) and \( 2 \mid x + y \), so \( 4 \mid (x - y)(x + y) = x^2 - y^2 \).

   - For \( n = 4 \):
     - \( 4 \mid x^4 - y^4 \) implies \( x, y \) have the same parity.
     - If \( x, y \) are both even, then \( x^4, y^4 \) are multiples of \( 16 \), so \( x^4 - y^4 \) is a multiple of \( 16 \).
     - If \( x, y \) are both odd, then \( x - y, x + y, x^2 + y^2 \) are all even, and one of \( x - y, x + y \) is a multiple of \( 4 \), so \( 16 \mid (x - y)(x + y)(x^2 + y^2) = x^4 - y^4 \).

   - For \( n = 2^k \) with \( k \ge 3 \):
     - Consider \( x = 3 \) and \( y = 1 \).
     - \( 3^{2^k} - 1 = (3^{2^{k-1}} + 1)(3^{2^{k-2}} + 1) \cdots (3^2 + 1)(3 + 1)(2) \).
     - Each factor \( 3^{2^i} + 1 \) is not a multiple of \( 4 \) except \( (3 + 1) \).
     - Thus, \( v_2(3^{2^k} - 1) = (k - 1) + 2 + 1 = k + 2 < 2k \) for \( k \ge 3 \).
     - Therefore, \( 2^{2k} \) does not divide \( 3^{2^k} - 1 \), so \( n = 2^k \) with \( k \ge 3 \) is not a solution.

5. **Conclusion:**
   - All solutions must be \( n = m \) or \( n = 2m \) where \( m \) is square-free.

\(\blacksquare\)

The final answer is \( \boxed{ n = m } \) or \( n = 2m \) where \( m \) is square-free.