The Afghan government is willing to recognize the Taliban as a legitimate political party as part of a potential ceasefire agreement with the Islamist militant group, President Ashraf Ghani said Wednesday.