You can possibly patent X as being useful to combine with Y and visa versa. The "useful" criteria is a very low bar as long as you are not talking about something that might be seen as abstract. The person I learned from to pass the patent bar said of a hypothetical chemical "pour it on the grass - if it kills it, that's useful; if it causes faster growth, that's also useful.
Lets say X is a novel handle and Y is something that would be easier to use if it had a handle. They are both useful. See this patent for a handle. Its claim 1 is:
Device handle (1) with two handle supports (2) that can be attached to
a device, between the ends of which are remote from the device, a
handle bar (3) is attached, characterized in that the longitudinal
axis (a) of the handle bar (3) is opposite the connecting line (b)
between the two ends (attachment points) of the handle supports (2)
intended for attachment to the device are laterally offset.
You might say its structure has no use but one of its attributes is "can be attached to a device". I would re-think the idea that something worth patenting has no use.
Also US569019, a retractable handle for a suitcase. This fancy handle sitting on a shelf is useless. A suitcase with no handle is not too useful.