Determine all positive integers $n$ such that all positive integers less than or equal to $n$ and relatively prime to $n$ are pairwise coprime.
1. **Initial Consideration**:
   - We start by noting that \( n = 1 \) trivially satisfies the condition since there are no positive integers less than or equal to 1 that are not relatively prime to 1.
   - For \( n \geq 2 \), we need to ensure that all positive integers less than or equal to \( n \) and relatively prime to \( n \) are pairwise coprime.

2. **Smallest Prime Not Dividing \( n \)**:
   - Let \( p \) be the smallest prime that does not divide \( n \). If \( p \geq 11 \), then the primes \( 2, 3, 5, \) and \( 7 \) must all divide \( n \). This implies:
     \[
     n \geq 2 \cdot 3 \cdot 5 \cdot 7 = 210
     \]
   - However, if \( p \geq 11 \), then \( p^2 < n \) (since \( p^2 < 121 \) and \( n \geq 210 \)). This means \( p \) and \( p^2 \) are not relatively prime, which contradicts our condition. Therefore, \( p \) must be one of \( \{2, 3, 5, 7\} \).

3. **Case Analysis**:
   - **Case \( p = 2 \)**:
     - If \( p = 2 \), then \( n \) must be odd (since 2 does not divide \( n \)). The only odd numbers less than 4 are 1 and 3. Thus, \( n = 3 \) is a valid solution.
   
   - **Case \( p = 3 \)**:
     - If \( p = 3 \), then \( n \) must be even (since 2 divides \( n \)). Additionally, \( n < 9 \). The even numbers less than 9 are 2, 4, 6, and 8. We need to check which of these satisfy the condition:
       - \( n = 2 \): The numbers less than or equal to 2 and relatively prime to 2 are {1}, which are pairwise coprime.
       - \( n = 4 \): The numbers less than or equal to 4 and relatively prime to 4 are {1, 3}, which are pairwise coprime.
       - \( n = 8 \): The numbers less than or equal to 8 and relatively prime to 8 are {1, 3, 5, 7}, which are pairwise coprime.
   
   - **Case \( p = 5 \)**:
     - If \( p = 5 \), then \( n \) must be divisible by 6 (since 2 and 3 divide \( n \)). Additionally, \( n < 25 \). The multiples of 6 less than 25 are 6, 12, 18, and 24. We need to check which of these satisfy the condition:
       - \( n = 6 \): The numbers less than or equal to 6 and relatively prime to 6 are {1, 5}, which are pairwise coprime.
       - \( n = 12 \): The numbers less than or equal to 12 and relatively prime to 12 are {1, 5, 7, 11}, which are pairwise coprime.
       - \( n = 18 \): The numbers less than or equal to 18 and relatively prime to 18 are {1, 5, 7, 11, 13, 17}, which are pairwise coprime.
       - \( n = 24 \): The numbers less than or equal to 24 and relatively prime to 24 are {1, 5, 7, 11, 13, 17, 19, 23}, which are pairwise coprime.
   
   - **Case \( p = 7 \)**:
     - If \( p = 7 \), then \( n \) must be divisible by 30 (since 2, 3, and 5 divide \( n \)). Additionally, \( n < 49 \). The only multiple of 30 less than 49 is 30. We need to check if it satisfies the condition:
       - \( n = 30 \): The numbers less than or equal to 30 and relatively prime to 30 are {1, 7, 11, 13, 17, 19, 23, 29}, which are pairwise coprime.

4. **Conclusion**:
   - Combining all valid solutions from the cases, we have:
     \[
     n \in \{1, 2, 3, 4, 6, 8, 12, 18, 24, 30\}
     \]

The final answer is \( \boxed{\{1, 2, 3, 4, 6, 8, 12, 18, 24, 30\}} \).