Let $x, y \in \mathbb{Z}$ such that $a^{n-1} \leq x, y < a^n$ for some fixed positive integers $a$ and $n$. Is there a nice characterization of the remainders $r$ satisfying $x y \equiv r \pmod{a^n}$? Further, given $r$, under what conditions does $x y \bmod a^n < r$ hold? Number theory isn't my specialty, so any pointers would be appreciated. I would ideally be looking for an answer that doesn't rely on factoring, if possible.