#arc145a. [arc145_a]AB Palindrome

[arc145_a]AB Palindrome

Problem Statement

You are given a string SS of length NN consisting of A and B.

You can repeat the following operation zero or more times:

  • choose a pair of adjacent characters in SS and replace them with AB.

Determine whether SS can be turned into a palindrome.

What is a palindrome? A string TT is a palindrome if and only if, for every integer ii (1leileT1 \\le i \\le |T|), the ii-th character from the beginning and the ii-th character from the end are the same, where T|T| is the length of TT.

Constraints

  • 2leqNleq2times1052 \\leq N \\leq 2\\times 10^5
  • SS is a string of length NN consisting of A and B.

Input

Input is given from Standard Input in the following format:

NN SS

Output

If SS can be turned into a palindrome, print Yes; otherwise, print No.


Sample Input 1

3
BBA

Sample Output 1

Yes

Replacing the 22-nd and 33-rd characters, BA, with AB will turn SS into BAB, a palindrome.


Sample Input 2

4
ABAB

Sample Output 2

No

No sequence of operations can turn SS into a palindrome.