Mm, if by touching you mean being right beside the player, then here's one way:
Allocate player's x and y, as well as monster's x and y into variables.
Set a variable into playerX - monsterX, and multiply it by -1 if it's negative with conditional branch, for absolute value (Distance). [You can use one of the x variables to save space.]
Repeat above process for Y.
Then, conditional branch: if the distance of x distance == 0, then if the distance of y distance < 1, do the blablabla. Else, do blabla.
And after that, another conditional branch: if the distance of y distance == 0, then if the distance of x distance < 1, do the blablabla. Else, do blabla.
That's a mindless but possibly inefficient way of doing it. Feeling sleepy at the moment, don't feel like thinking. D: What are you using such a feature for, by the way? If you state the purpose there might be a much easier way to reach what you want to do.