Run Fermat from CPP

Run Fermat from CPP