5. Given the set $\{1,2,3, \cdots, 3 n-1,3 n\}$, it can be divided into $n$ mutually disjoint triples $|x, y, z|$, where $x+y=3 z$. The two smallest positive integers $n$ that satisfy the above requirement are $\qquad$.
$5.5,8$.
From the problem, we know the triplet is $\left\{x_{i}, y_{i}, z_{i}\right\}$, and $x_{i}+y_{i}=3 z_{i}$, $i=1,2, \cdots, n$. Therefore,
$$
\sum_{i=1}^{n}\left(x_{i}+y_{i}+z_{i}\right)=4 \sum_{i=1}^{n} z_{i},
$$

which means $4 \sum_{i=1}^{n} z_{i}=\frac{3 n(3 n+1)}{2}$.
Thus, when $2 \mid n$, $8 \mid n$, the minimum value of $n$ is 8;
when 2 Y $n$, $8 \mid 3 n+1$, the minimum value of $n$ is 5.
When $n=5$, the triplets are $\{1,11,4\},\{2,13,5\}$, $\{3,15,6\},\{9,12,7\},\{10,14,8\}$.

When $n=8$, the triplets are $\{1,14,5\},\{2,19,7\}$, $\{3,21,8\},\{4,23,9\},\{6,24,10\},\{15,18,11\}$, $\{16,20,12\},\{17,22,13\}$.