I am attempting to solve a suggested problem while studying for my upcoming real analysis exam. Could somebody please help me with this question?

Question: Let X be any set and M={empty set, X}. Prove that the class of measurable functions are exactly those functions that are constant on X.

I think I have figured out how to prove that the constant function is measurable but I cannot figure out how to prove that no other functions are measurable.

Proving that constant function is measurable: If f(x) = c for all x element of X, then f-inverse(V)=X if c is an element of V or empty set if c is not an element of V. Since M={empty set, X}, f(x)=c is measurable.

How would I prove that all other functions are not measurable?

(Definition of measurable: A function f from set X with sigma algebra M, into [-infinity,infinity] is called measurable if f-inverse(V) is an element of M for every open set V that is a subset of V subset of [-infinity,infinity])