A courier drone starts at cell (0, 0) and walks a path across an infinite integer grid. It reads a string of single-step moves, one character at a time:
N: y-coordinate + 1,S: y-coordinate - 1,E: x-coordinate + 1,W: x-coordinate - 1.
The starting cell counts as visited. The path self-intersects if, at any moment after a move, the drone lands on a cell it has already visited (including a return to the origin).
Input format
A single line: a non-empty string of characters, each one of N, S, E, W.
Output format
Print YES if the path ever revisits a cell, otherwise print NO.
Constraints
- 1 <= length of the move string <= 100000