"X=X1" assign the content of X1 to X. "X==X1" check if X is equal to X1. You need to change "X=X1 AND Y=Y1" to "X==X1 AND Y==Y1"