Given $N$ points where the coordinates of the $i$th point are $(x_i,y_i)$ find $(x,y)$ that minimizes the following sum. $$\sum_{i=1}^ N\max(|x-x_i|,|y-y_i|)$$ I've done a similar problem minimize $$\sum_{i=1}^ N(|x-x_i|+|y-y_i|)$$ Which I found that the minimum is achieved when we take $x$ as the median of $x_1,x_2,\ldots,x_N$ and $y$ as median of $y_1,y_2,\ldots,y_N$.
I'm stuck on the first one because I don't know how to manipulate the $\max$.
Edit 1:
After tinkering with the suggestion below I am still struggling to make progress here: The $\frac{|x-x_i|+|y-y_i|}{2}$ can be minimized by taking the median but I am not sure how to minimize the other part: $\frac{||x|-|x_i||-||y|-|y_i||}{2}$. I also don't know what to do if I could minimize the other part. How can I minimize the sum of these two?