Determine all positive integers $n$ for which there exists an infinite subset $A$ of the set $\mathbb{N}$ of positive integers such that for all pairwise distinct $a_1,\ldots , a_n \in A$ the numbers $a_1+\ldots +a_n$ and $a_1a_2\ldots a_n$ are coprime.
To determine all positive integers \( n \) for which there exists an infinite subset \( A \) of the set \( \mathbb{N} \) of positive integers such that for all pairwise distinct \( a_1, \ldots, a_n \in A \), the numbers \( a_1 + \ldots + a_n \) and \( a_1 a_2 \ldots a_n \) are coprime, we proceed as follows:

1. **Understanding the Problem:**
   We need to find \( n \) such that there exists an infinite subset \( A \subseteq \mathbb{N} \) where for any \( n \) distinct elements \( a_1, a_2, \ldots, a_n \in A \), the sum \( a_1 + a_2 + \ldots + a_n \) and the product \( a_1 a_2 \ldots a_n \) are coprime.

2. **Initial Consideration:**
   Let's consider the case when \( n = 1 \). For any \( a_1 \in A \), the sum \( a_1 \) and the product \( a_1 \) are trivially coprime since they are the same number. Thus, \( n = 1 \) works.

3. **Case for \( n = 2 \):**
   Suppose \( n = 2 \). We need to find an infinite subset \( A \) such that for any two distinct elements \( a_1, a_2 \in A \), \( a_1 + a_2 \) and \( a_1 a_2 \) are coprime. Consider \( A = \{1, 2, 3, \ldots\} \). For any two distinct elements \( a_1 \) and \( a_2 \), the sum \( a_1 + a_2 \) and the product \( a_1 a_2 \) are not necessarily coprime. For example, if \( a_1 = 2 \) and \( a_2 = 4 \), then \( a_1 + a_2 = 6 \) and \( a_1 a_2 = 8 \), which are not coprime. Thus, \( n = 2 \) does not work.

4. **General Case for \( n \geq 2 \):**
   Suppose \( n \geq 2 \). We need to show that there does not exist an infinite subset \( A \) such that for any \( n \) distinct elements \( a_1, a_2, \ldots, a_n \in A \), the sum \( a_1 + a_2 + \ldots + a_n \) and the product \( a_1 a_2 \ldots a_n \) are coprime.

   - Consider the subset \( A = \{p^i \mid i \in \mathbb{N}\} \) for some prime \( p \). For any \( n \) distinct elements \( a_1 = p^{i_1}, a_2 = p^{i_2}, \ldots, a_n = p^{i_n} \in A \), the sum \( a_1 + a_2 + \ldots + a_n = p^{i_1} + p^{i_2} + \ldots + p^{i_n} \) and the product \( a_1 a_2 \ldots a_n = p^{i_1 + i_2 + \ldots + i_n} \). Both the sum and the product are divisible by \( p \), hence they are not coprime. This shows that for any prime \( p \), the subset \( A \) does not satisfy the condition for \( n \geq 2 \).

5. **Conclusion:**
   From the above analysis, we see that the only value of \( n \) for which there exists an infinite subset \( A \subseteq \mathbb{N} \) such that for all pairwise distinct \( a_1, \ldots, a_n \in A \), the numbers \( a_1 + \ldots + a_n \) and \( a_1 a_2 \ldots a_n \) are coprime is \( n = 1 \).

The final answer is \( \boxed{ n = 1 } \).