Python 2.7 has a separation between its int and long types. Because you’re using such large numbers, it’s possible that you’re running into this, but right I’m not sure how this would come into play.
In Python 3 these are all the same; you could also try testing the same code with python 3.