AdvancedRating 1500
Robot in a Circle
A robot starts at (0, 0) facing north and repeats the instructions G (go 1), L (turn left), R (turn right) forever. Print YES if it stays within some circle.
Input
One line.
Output
YES or NO.
Sample 1
Input
GGLLGG
Output
YES
Sample 2
Input
GG
Output
NO
Output appears here