The base of the unit regular pyramid with a square base $ABCD$ is a unit square, and its apex is $E$. On the base edge $AB$ there is a point $P$, and on the side edge $EC$ there is a point $Q$, such that $PQ$ is perpendicular to both $AB$ and $EC$. We also know that $AP: PB = 6: 1$. What are the lengths of the side edges?