Pyongyang outmaneuvers Trump, as Tehran watches