For the following relation, give the domain and range, and indicate whether it is a function.

{(1,2),(6,3),(3,1),(8,7)}