Hungary’s new prime minister, Péter Magyar, used his first speech after being sworn in to demand the resignation of President Tamás Sulyok, giving him and other senior officials a deadline of May 31 to step aside.