  Nivat's conjecture is a long-standing open combinatorial problem. It concerns
two-dimensional configurations, that is, maps $\mathbb Z^2 \rightarrow \mathcal
A$ where $\mathcal A$ is a finite set of symbols. Such configurations are often
understood as colorings of a two-dimensional square grid. Let $P_c(m,n)$ denote
the number of distinct $m \times n$ block patterns occurring in a configuration
$c$. Configurations satisfying $P_c(m,n) \leq mn$ for some $m,n \in \mathbb N$
are said to have low rectangular complexity. Nivat conjectured that such
configurations are necessarily periodic.
  Recently, Kari and the author showed that low complexity configurations can
be decomposed into a sum of periodic configurations. In this paper we show that
if there are at most two components, Nivat's conjecture holds. As a corollary
we obtain an alternative proof of a result of Cyr and Kra: If there exist $m,n
\in \mathbb N$ such that $P_c(m,n) \leq mn/2$, then $c$ is periodic. The
technique used in this paper combines the algebraic approach of Kari and the
author with balanced sets of Cyr and Kra.
