LearnPy Hub
← Arena
EasyRating 800

Back to the Start?

A robot moves on a grid by the letters U, D, L, R. Print YES if it ends where it started.

Input

One line of moves.

Output

YES or NO.

Sample 1

Input
UD
Output
YES

Sample 2

Input
LL
Output
NO
solution.py
Output appears here
Back to the Start? · Python Arena problem · LearnPy Hub