(6) (20%) Suppose $x_1, \dots, x_n$ be n finite real values. Let a is the value that minimize $\sum_{i=1}^n |x_i - a|^2$; and b is the value that minimize $\sum_{i=1}^n |x_i - a|$. Find a and b in term of $x_1, \dots, x_n$, respectively.