题目描述
Problem Description
Takahashi is about to eat $ N $ dishes.
The $ i $-th dish he plans to eat is sweet if $S_i\ =$ sweet, and salty if $S_i\ =$ salty.
Takahashi will feel sick if he eats two sweet dishes in a row, and after that, he won't be able to eat any more dishes.
Determine if Takahashi can eat all the dishes.
Input Format
The input is given from the standard input in the following format:
$ N $ $ S_1 $ $ S_2 $ $\vdots$ $ S_N $
Output Format
If Takahashi can eat all the dishes, output Yes; otherwise, output No.
Sample Input and Output
Sample Input #1
5
salty
sweet
salty
salty
sweet
Sample Output #1
Yes
Sample Input #2
4
sweet
salty
sweet
sweet
Sample Output #2
Yes
Sample Input #3
6
salty
sweet
sweet
salty
sweet
sweet
Sample Output #3
No
Notes/Hints
Constraints
- $ N $ is an integer between $ 1 $ and $ 100 $ inclusive.
- $ S_i $ is either
sweetorsalty.
Sample Explanation 1
Takahashi does not eat two sweet dishes in a row, so he can eat all the dishes without feeling sick.
Sample Explanation 2
Takahashi will feel sick, but he can eat all the dishes.
Sample Explanation 3
Takahashi will feel sick after eating the 3rd dish, and he won't be able to eat the 4th dish and beyond.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分