Jack decide invite Emma dinner Jack modest student do not want expensive restaurant Emma girl high taste prefer elite placesMunhattan consist n street m avenue there exactly restaurant intersection street avenue the street number integer 1 n avenue number integer 1 m the cost dinner restaurant intersection ith street jth avenue cijJack Emma decide choose restaurant follow way Firstly Emma choose street dinner Jack choose avenue Emma Jack make choice optimally Emma want maximize cost dinner Jack want minimize Emma take account Jack want minimize cost dinner find cost dinner couple love