is there a mathematical way to store 2 numbers (let's say x/y coordinates) as 1 number? perhaps like a seed?

if my x/y was -3002/1506 there doesn't seem to be a way to store that as 1 number, but is there a way to store a different number that somehow can be extrapolated into these 2?

You could maybe store them as hex and parse them out.. hex:AE would = 10,14

I supposed negative numbers would make that even more complicated. Any ideas? it's more of a curiosity...