Speed up fermats