easy solution with gmps primality tester