What I meant was to go the YES path if both X and Y are on the screen, and go NO path if only 1 of them (or 0) are on the UI layout.
What works but needs 2 blocks is :
Inspect Layout (result UI_layout) and then If True block :
1 = contains(UI_layout, "X") && 1 = contains(UI_layout, "Y")
It works in that case, but I wanted to make this in only 1 block.