The syntax is fine, but the effect is probably not what you intended: A<>x OR A<>y is always true, since it can't be both. You probably mean A<>x AND A<>y.
A<>x OR A<>y
A<>x AND A<>y