If x varies inversely as y and x=12 when y=3, what is the value of x when y=9?