The president and prime minister agreed to step down after protesters stormed both leaders' residences on Saturday over the country's economic chaos.