You live in a city with an ideal grid of roads and use a mobile application for walking. The application generates the route in the form of a list of directions: 'n' (north), 's' (south), 'w' (west), 'e' (east). Each direction means the passage of one quarter in one minute. You need to determine whether the proposed route will return you to the starting point in exactly 10 minutes.
Input format
a line containing the direction of movement through a gap, where each direction is represented by the letter: N, S, W, E
Output format
Tecst "Yes" if the route lasts exactly 10 minutes and returns to the starting point, otherwise "no" Div
Hint
There will be no clue here, decide for yourself!