I are aware that there are numerous results in selection principle linked to this issue, e.g. if $N$ is primary then $r$ divides $N-1$, but I was not able to find a basic recipe that usually operates in polynomial time, nor to point out that it is not possible.Period Date Prediction : Holding track of menstrual periods may also help folks know when