Which of the following is a function?

A. {(1,1), (2,5), (-2,5), (1,-1)}
B. {(-1,1), (-2,1), (-1,3), (-4,1)}
C. {(-1,1), (-1,2), (-1,3), (-1,4)}
D. {(-1,1), (-2,2), (-3,3), (-4,4)}