A - Contents of the Wallet Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200 点

問題文

高橋君の財布には N 枚のお金が入っています。財布の中身は長さ N の文字列 S で表され、 S の i 文字目が C なら i 枚目は硬貨、 B なら紙幣です。

高橋君の財布に硬貨と紙幣が両方とも 1 枚以上入っているなら Yes を、そうでないなら No を出力してください。

制約

  • 1 \leq N \leq 100
  • S は C と B のみからなる長さ N の文字列

入力

入力は以下の形式で標準入力から与えられる。

N
S
  • 1 行目には、お金の枚数 N が与えられる。
  • 2 行目には、財布の中身を表す文字列 S が与えられる。

出力

硬貨と紙幣が両方あるなら Yes を、そうでないなら No を 1 行で出力せよ。


入力例 1

3
CCB

出力例 1

Yes

入力例 2

3
BBB

出力例 2

No

入力例 3

3
BCB

出力例 3

Yes

入力例 4

60
CBCCCCCCBBBBBBBBBBBBBBCBCCCCBBCBCBBBBBCCBBBBBCBBBCBBCBCCBBBB

出力例 4

Yes

入力例 5

7
CBBBCBB

出力例 5

Yes

Score : 200 pts

Problem Statement

Takahashi's wallet contains N pieces of money. The contents of the wallet are represented by a string S of length N: if the i-th character of S is C, the i-th piece is a coin; if it is B, the piece is a bill.

Print Yes if Takahashi's wallet contains at least one coin and at least one bill, and No otherwise.

Constraints

  • 1 \leq N \leq 100
  • S is a string of length N consisting only of C and B.

Input

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

N
S
  • The first line contains the number of pieces of money N.
  • The second line contains the string S representing the contents of the wallet.

Output

Print Yes in one line if both coins and bills are present, and No otherwise.


Sample Input 1

3
CCB

Sample Output 1

Yes

Sample Input 2

3
BBB

Sample Output 2

No

Sample Input 3

3
BCB

Sample Output 3

Yes

Sample Input 4

60
CBCCCCCCBBBBBBBBBBBBBBCBCCCCBBCBCBBBBBCCBBBBBCBBBCBBCBCCBBBB

Sample Output 4

Yes

Sample Input 5

7
CBBBCBB

Sample Output 5

Yes