Answer
See explanation,
Work Step by Step
The domain is the set of x values that are present so it is simply a list of $x$-coordinates.
The range, likewise, is the set of y-coordinates.
If values are included multiple times, one only needs to write them once.