The value of y varies directly with x. If x = 7, then y = -40. What is the value of x when y = 51?