Suppose $n=5$. One co-prime grouping can be $\{(1,2),(3,4,5)\}$.
There can be any other combination, but the number of groups will be always $2$, i.e. $(1,2)$ and $(3,4,5)$.
Number of elements in a group can be minimum $2$.
Huge edit, so set off for inspection by OP.
Let $n$ be a positive integer. We say "$n$ makes us happy" when there is a partition of the integers $\{1, 2, \dots, n\}$ into two subsets, $p_1, p_2$ such that for all $x,y \in p_1$ with $x \neq y$, $\gcd(x,y) =1$, and similarly for distinct pairs of numbers in $p_2$.
What is the largest $n$ that makes us happy?
Any such partition cannot have more than one even number in $p_1$ or in $p_2$, otherwise any two such even numbers are not coprime. So there are at most two even numbers in $\{1,2,\dots n\}$, which forces $n < 6$. You have given an example with $n = 5$, so $5$ is the largest number that makes us happy.