Python pow function

Will this work as intended.
Find ordered pairs n,m in factors that divide x-1

x=pow(2,3628800)
for n in factors:
    for m in factors:
        if x%(m*n)==1:
            ans+=1
        i+=1
        print(i)
print(ans)

m and n are also numbers on the order of 500000-600000 digits. i is just to check the progress as it takes about 5 hours to compute.