ATHENS, Greece — Macedonia signed a landmark agreement Sunday to change its name to North Macedonia, sealing a deal with Greece that would, if ratified, resolve a decades-old dispute and pave the way for the enlargement of the European Union and NATO. Hailing a “patriotic and mutually beneficial agreement for both peoples,” Prime Minister Alexis Tsipras of Greece said it was important to see the accord through. The pact must still pass a referendum in Macedonia and ratification in the parliaments of both countries.