ab

AtCoder
IDabc327_a
Time2000ms
Memory256MB
Difficulty
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.) ## Constraints * $2 \leq N \leq 100$ * $S$ is a string of length $N$ consisting of lowercase English letters. ## Input The input is given from Standard Input in the following format: $N$ $S$ [samples]
Samples
Input #1
3
abc
Output #1
Yes

The string `abc` has `a` as the first character and `b` as the second character, which are adjacent. Thus, print `Yes`.
Input #2
2
ba
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.)
Input #3
7
atcoder
Output #3
No
API Response (JSON)
{
  "problem": {
    "name": "ab",
    "description": {
      "content": "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` a",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc327_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ of length $N$ consisting of lowercase English letters.  \nIf there are any adjacent occurrences of `a` and `b` in $S$, print `Yes`; otherwise, print `No`. (The order of `a` a...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments