Mod Determine and Factor