  A $\{0,1\}$-valued function on a two-dimensional rectangular grid is called
threshold if its sets of zeros and ones are separable by a straight line. In
this paper we study 2-threshold functions, i.e. functions representable as the
conjunction of two threshold functions. We provide a characterization of
2-threshold functions by pairs of oriented prime segments, where each such
segment is defined by an ordered pair of adjacent integer points.
