Some optimizations.
Added line number in addition to the prime itself and switched to using 64 bit integers.