  The goal of the paper is to introduce a version of Schubert calculus for each
dihedral reflection group W. That is, to each "sufficiently rich'' spherical
building Y of type W we associate a certain cohomology theory and verify that,
first, it depends only on W (i.e., all such buildings are "homotopy
equivalent'') and second, the cohomology ring is the associated graded of the
coinvariant algebra of W under certain filtration. We also construct the dual
homology "pre-ring'' of Y. The convex "stability'' cones defined via these
(co)homology theories of Y are then shown to solve the problem of classifying
weighted semistable m-tuples on Y in the sense of Kapovich, Leeb and Millson
equivalently, they are cut out by the generalized triangle inequalities for
thick Euclidean buildings with the Tits boundary Y. Quite remarkably, the
cohomology ring is obtained from a certain universal algebra A by a kind of
"crystal limit'' that has been previously introduced by Belkale-Kumar for the
cohomology of flag varieties and Grassmannians. Another degeneration of A leads
to the homology theory of Y.
