Implemetation of Fermat's Primality Test for Project 1 of CS312