determine the value of x and y