题目描述
Problem Statement
You are given a string S of length N consisting of lowercase English letters.
If there are any adjacent occurrences of a and b in S, print Yes; otherwise, print No. (The order of a and b does not matter.)
Input
The input is given from Standard Input in the following format:
N
S
Output
If there are any adjacent occurrences of a and b in S, print Yes; otherwise, print No.
Constraints
- $2 \leq N \leq 100$
- S is a string of length N consisting of lowercase English letters.
Sample Input 1
3
abc
Sample Output 1
Yes
The string abc has a as the first character and b as the second character, which are adjacent. Thus, print Yes.
Sample Input 2
2
ba
Sample Output 2
Yes
The string ba has a as the second character and b as the first character, which are adjacent. (Note that the order of a and b does not matter.)
Sample Input 3
7
atcoder
Sample Output 3
No
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分