Problem10923--ABC364 - A - Glutton Takahashi

10923: ABC364 - A - Glutton Takahashi

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

Takahashi is planning to eat $N$ dishes.

The $i$-th dish he plans to eat is sweet if $S_i =$ sweet, and salty if $S_i =$ salty.

If he eats two sweet dishes consecutively, he will feel sick and be unable to eat any more dishes.

Determine whether he can eat all the dishes.

Input

The input is given from Standard Input in the following format:

```
$N$
$S_1$
$S_2$
$\vdots$
$S_N$
```

Output

Print Yes if Takahashi can eat all the dishes, and No otherwise.

Constraints

  • $N$ is an integer between $1$ and $100$, inclusive.
  • Each $S_i$ is sweet or salty.

Sample 1 Input

5
salty
sweet
salty
salty
sweet

Sample 1 Output

Yes
He will not eat two sweet dishes consecutively, so he can eat all the dishes without feeling sick.

Sample 2 Input

4
sweet
salty
sweet
sweet

Sample 2 Output

Yes
He will feel sick but can still eat all the dishes.

Sample 3 Input

6
salty
sweet
sweet
salty
sweet
sweet

Sample 3 Output

No
He feels sick when eating the 3rd dish and cannot eat the 4th and subsequent dishes.

Source/Category