Show that Y is a finite set

Let X and Y be sets satisfying Y X (- , ). Suppose that X is compact and that for every x X, there is a neighborhood of x which contains only a finite number of points of Y. This number may vary with x. Show that Y is a finite set.

What I have so far is that since X is compact it is closed and bounded and since it is closed there is an accumulation point in each neighborhood of X. then the neighborhood contains the point (x- ,x+ . And the Ix's are open sets that contain X.

I'm not sure what to do next and/or how to actually do the proof of it, hope someone can help. thanks