remove fermats little theorem method