  We use ab initio electronic structure calculations in combination with Monte
Carlo simulations to investigate the magnetic and ferroelectric properties of
bulk orthorhombic HoMnO$_3$ and ErMnO$_3$. Our goals are to explain the
inconsistencies in the measured magnetic properties of the orthorhombic
perovskite manganites (o-$R$MnO$_3$) with small rare-earth ($R$) cations or Y,
as well as the contradictions between the directions and amplitudes of the
electric polarizations reported by different experimental groups. Our
computations stabilize several exotic magnetic orders (so-called w-spiral,
H-AFM and I-AFM), whose presence resolve the contradictions in the measured
magnetic and ferroelectric properties of o-$R$MnO$_3$. We show that these
orders emerge due to strong four-spin ring exchange interactions.
