Ousted Malaysian Prime Minister Najib Razak says he had resigned as president of United Malay National Organisation (UMNO) party, and chairman of the Barisan Nasional alliance, with immediate effect.