A Simple Algorithm for Prime Factorization and Primality Testing | Synapse