I am not quite sure about how to solve the following exercise:

Given that a machine is turned on at a random time (X) (in hours) in a particular day and turned off at another random time (Y) (on the same day) determine the joint probability mass function f(X,Y).

Well I am certain of a thing! the the X marginal prob. mass function is a uniform one, as to the Y one I am not quite sure of it since y must always be greater than x.

Well even if I know the Y and X distribution, can I assume they are Independent? well the range of Y depends on x doesnt it make one dependent on the other?