Let $n$ be a positive integer such that $n \geq 2$. Let $x_1, x_2,..., x_n$ be $n$ distinct positive integers and $S_i$ sum of all numbers between them except $x_i$ for $i=1,2,...,n$. Let $f(x_1,x_2,...,x_n)=\frac{GCD(x_1,S_1)+GCD(x_2,S_2)+...+GCD(x_n,S_n)}{x_1+x_2+...+x_n}.$
Determine maximal value of $f(x_1,x_2,...,x_n)$, while $(x_1,x_2,...,x_n)$ is an element of set which consists from all $n$-tuples of distinct positive integers.
1. **Understanding the Problem:**
   We are given \( n \) distinct positive integers \( x_1, x_2, \ldots, x_n \) and we need to find the maximal value of the function:
   \[
   f(x_1, x_2, \ldots, x_n) = \frac{\text{GCD}(x_1, S_1) + \text{GCD}(x_2, S_2) + \cdots + \text{GCD}(x_n, S_n)}{x_1 + x_2 + \cdots + x_n}
   \]
   where \( S_i \) is the sum of all \( x_j \) except \( x_i \).

2. **Case \( n = 2 \):**
   Let \( x_1 \) and \( x_2 \) be two distinct positive integers. Then:
   \[
   S_1 = x_2 \quad \text{and} \quad S_2 = x_1
   \]
   Therefore:
   \[
   f(x_1, x_2) = \frac{\text{GCD}(x_1, x_2) + \text{GCD}(x_2, x_1)}{x_1 + x_2} = \frac{2 \cdot \text{GCD}(x_1, x_2)}{x_1 + x_2}
   \]
   Let \( d = \text{GCD}(x_1, x_2) \). Then \( x_1 = da \) and \( x_2 = db \) where \( a \) and \( b \) are coprime integers. Thus:
   \[
   f(x_1, x_2) = \frac{2d}{da + db} = \frac{2}{a + b}
   \]
   Since \( x_1 \) and \( x_2 \) are distinct, \( a \) and \( b \) are distinct positive integers, and \( a + b \geq 3 \). Therefore:
   \[
   f(x_1, x_2) \leq \frac{2}{3}
   \]
   The equality holds when \( a = 1 \) and \( b = 2 \) (or vice versa), i.e., \( x_1 = 1 \) and \( x_2 = 2 \).

3. **Case \( n \geq 3 \):**
   For \( n \geq 3 \), we need to show that \( f(x_1, x_2, \ldots, x_n) \leq 1 \) and find when equality holds.
   Note that:
   \[
   \text{GCD}(x_i, S_i) \leq x_i
   \]
   for every \( i \). Therefore:
   \[
   \text{GCD}(x_1, S_1) + \text{GCD}(x_2, S_2) + \cdots + \text{GCD}(x_n, S_n) \leq x_1 + x_2 + \cdots + x_n
   \]
   This implies:
   \[
   f(x_1, x_2, \ldots, x_n) \leq 1
   \]
   To achieve equality, we need \( \text{GCD}(x_i, S_i) = x_i \) for every \( i \), which means \( x_i \mid S_i \). This implies \( x_i \mid (x_1 + x_2 + \cdots + x_n) \) for every \( i \).

4. **Constructing a Sequence:**
   If \( (x_1, x_2, \ldots, x_{n-1}) \) satisfies the condition, then \( (x_1, x_2, \ldots, x_{n-1}, x_1 + x_2 + \cdots + x_{n-1}) \) also satisfies the condition. Starting with \( (1, 2, 3) \) for \( n = 3 \), we can use induction to show that the sequence \( (1, 2, 3, 6, 12, \ldots) \) satisfies the condition for all \( n \geq 3 \).

Conclusion:
The maximal value of \( f(x_1, x_2, \ldots, x_n) \) is:
- \( \frac{2}{3} \) for \( n = 2 \)
- \( 1 \) for \( n \geq 3 \)

The final answer is \( \boxed{1} \) for \( n \geq 3 \) and \( \boxed{\frac{2}{3}} \) for \( n = 2 \).