think New York rectangular grid consist N vertical avenue numerate 1 N M horizontal street numerate 1 M C friend stay c hotel locate streetavenue crossing they go celebrate birthday h restaurant locate streetavenue crossing they want maximum distance cover travel restaurant minimum possible help friend choose optimal restaurant celebrationsuppose distance neighboring crossing equal kilometer