Which relation represents a function sample A or sample B

Sample A is a function because we don't have 2 values of x that are the same
Sample B is not a function, because it fails the vertical line test (x = 4 and y =1 also x=4 and y = 10) (4, 1) and (4, 10)
Hence the correct option is ; sample A