If I have a sequence of random variables $X_1, X_2, \ldots, X_n$ (possibly infinite) such that all pairwise cdf's are factorized:

$$F(X_i, X_j) = F_i(X_i) F_j(X_j)$$

for all pairs $(X_i, X_j)$, does it mean that the joint cdf is also factorized? That is:

$$F(X_1, \ldots, X_n) = \prod_{i=1}^{n} F_i(X_i)$$

In other words, if I prove that each pair in the sequence is statistically independent of each other, can longer sequences still be non-independent?

It seems to me that they can, but I can't come up with a counter example.