$1 . A$ City, B City, and $C$ City have 10, 10, and 8 units of a certain machine, respectively. Now it is decided to allocate these machines to $D$ City (18 units) and $E$ City (10 units). It is known that the cost to transport one unit from $A$ City to $D$ City and $E$ City is 200 yuan and 800 yuan, respectively; from $B$ City to $D$ City and $E$ City is 300 yuan and 700 yuan, respectively; from $C$ City to $D$ City and $E$ City is 400 yuan and 500 yuan, respectively.
(1) Suppose $x$ units are transported from $A$ City and $B$ City to $D$ City each. After all 28 units are transported, find the function relationship of the total cost $W$ (yuan) with respect to $x$ (units), and find the minimum and maximum values of $W$;
(2) Suppose $x$ units are transported from $A$ City to $D$ City, and $y$ units are transported from $B$ City to $D$ City. After all 28 units are transported, express the total cost $W$ (yuan) in terms of $x$ and $y$, and find the minimum and maximum values of $W$.
(1) When $x=9$, $W$ reaches its minimum value of 10000 yuan; when $x=5$, $W$ reaches its maximum value of 13200 yuan. (2) When $x=10$, $y=8$, $W$ reaches its minimum value of 9800; when $x=0$, $y=10$, $W$ reaches its maximum value of 14200 yuan.