Split a ray cast?

So the following code gets the distance of a ray cast, I was just wondering how I could split the results so that I could have seperate values for x, y and z.

var ray = mainCamera.ScreenPointToRay (Input.mousePosition);
		
		Debug.Log(ray.GetPoint(distance));

I believe it returns a vector…if so:

var myVector = ray.GetPoint(distance);

Debug.Log(myVector.x +" and "+myVector.y +" and "+ myVector.z );