We Come in Peace I


Submit solution

Points: 1
Time limit: 0.5s
Memory limit: 256M

Author:
Problem type
Allowed languages
C++, Java, Python

BOOM! Your daring explosion shook the alien ship, but wasn't enough to break through its hull. Suddenly, an alien storms in and pushes your team down a long hall. They don't seem angry, more... curious. Maybe you've earned their respect?

You are ushered into a dim room, where a single alien stands cloaked in dark robes. The captain, no doubt.

They start communicating in a strange series of bleeps, which you record carefully. After hours of work, you manage to translate their speech into an English string. However, the translation is noisy, and you might have some extra characters due to transcription.

Can you remove zero or more characters from the recorded string to make the word "PEACE"? If yes, the aliens come in peace. If not, they might be hostile.

Input

The first line consists of a single integer, n (1 \leq n \leq 10^5), the number of characters in the alien's monologue.

The next line consists of a single string S of length n, containing the alien's monologue. This string strictly consists of uppercase English characters.

Output

Output "Yes" if you can remove some set of characters from S to spell out the word "PEACE". Otherwise, output "No".

Example

Input 1
15
HEYPEHELLOAHICE
Output 1
Yes

"PEACE" can be derived by removing the following characters from the aliens' speech:

Input 2
5
PEACE
Output 2
Yes

You don't need to remove any letters.

Input 3
5
AEECP
Output 3
No

The string "PEACE" does not exist in this speech.

Input 4
26
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Output 4
No

Comments

There are no comments at the moment.