Under construction

Still being built. Things may change

Matched Letters

Time limit2sMemory limit1024 MB

Summary
Given a string, the task is to check whether every character is the same letter and print Yes or No.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

You are given a string SS of length NN. Each character of SS is a lowercase English letter.

Print Yes if all characters of SS are the same letter, and No otherwise.

Input

The input is given in the following format.

N
S

Output

Print Yes if all characters of SS are the same letter, and No otherwise.

Do not print anything other than the answer. (Do not print prompts for input or any other text.)

Constraints

  • 2≤N≤1002 \leq N \leq 100.
  • SS is a string of length NN.
  • Each character of SS is a lowercase English letter.
  • NN is an integer.

Examples4

  1. Example 1

    Input
    4
    bbbb
    
    Expected output
    Yes
    
  2. Example 2

    Input
    7
    pppdppp
    
    Expected output
    No
    
  3. Example 3

    Input
    2
    xx
    
    Expected output
    Yes
    
  4. Example 4

    Input
    9
    joijoijoi
    
    Expected output
    No