Two qualities X and Y are such that Y varies inversely as the square of X. Given that y= 8 when X= 2, find the value of X when Y= 18.