Uploaded BS-GS and Miller-Rabin primality test