Question
Following Directions

Alperen is standing at the point (0,0). He is given a string ๐‘  of length ๐‘› and performs ๐‘› moves. The ๐‘–-th move is as follows:

  • if ๐‘ ๐‘–=๐™ป, then move one unit left;
  • if ๐‘ ๐‘–=๐š, then move one unit right;
  • if ๐‘ ๐‘–=๐š„, then move one unit up;
  • if ๐‘ ๐‘–=๐™ณ, then move one unit down.



There is a candy at (1,1) (that is, one unit above and one unit to the right of Alperen's starting point). You need to determine if Alperen ever passes the candy.
 
Input
The first line of each test case contains an integer ๐‘› (1โ‰ค๐‘›โ‰ค50) โ€” the length of the string.
The second line of each test case contains a string ๐‘  of length ๐‘› consisting of characters ๐™ป, ๐š, ๐™ณ, and ๐š„, denoting the moves Alperen makes.
Output
For each test case, output "YES" (without quotes) if Alperen passes the candy, and "NO" (without quotes) otherwise.
Example
Example 1:
Input
7
UUURDDL
Output
YES
Explanation:
Alperen follows the path
(0,0)โ†’๐š„(0,1)โ†’๐š„(0,2)โ†’๐š„(0,3)โ†’๐š(1,3)โ†’๐™ณ(1,2)โ†’๐™ณ(1,1)โ†’๐™ป(0,1).
Note that Alperen doesn't need to end at the candy's location of (1,1), he just needs to pass it at some point.

Example 2:
Input
2
UR
Output
YES
Explanation:
(0,0)โ†’๐š„(0,1)โ†’๐š(1,1).

Online