Instead of shopping (today is Black Friday!), Sreenath wants to go cut triangles. Points $A$, $B$, and $C$ are located at $(1, 1)$, $(5, 5)$, and $(3, 1)$ respectively. Sreenath chooses point $E$ on $\overline{AC}$ such that $BE$ cuts $\triangle ABC$ into two triangles with equal perimeters. Sreenath then chooses point $Q$ on $\overline{AC}$ such that $BQ$ cuts $\triangle ABC$ into two triangles with equal areas. Find $QE$.