A - Capitalized? Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100100

問題文

英大文字・英小文字からなる空でない文字列 SS が与えられます。以下の条件が満たされているか判定してください。

  • SS の先頭の文字は大文字であり、それ以外の文字はすべて小文字である。

制約

  • 1S1001 \leq |S| \leq 100S|S| は文字列 SS の長さ)
  • SS の各文字は英大文字または英小文字である。

入力

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

SS

出力

条件が満たされていれば Yes、そうでなければ No を出力せよ。


入力例 1Copy

Copy
Capitalized

出力例 1Copy

Copy
Yes

Capitalized の先頭の文字 C は大文字であり、それ以外の文字 apitalized はすべて小文字であるため、Yes を出力します。


入力例 2Copy

Copy
AtCoder

出力例 2Copy

Copy
No

AtCoder は先頭以外にも大文字 C を含むため、No を出力します。


入力例 3Copy

Copy
yes

出力例 3Copy

Copy
No

yes の先頭の文字 y は大文字でないため、No を出力します。


入力例 4Copy

Copy
A

出力例 4Copy

Copy
Yes

Score: 100100 points

Problem Statement

You are given a non-empty string SS consisting of uppercase and lowercase English letters. Determine whether the following condition is satisfied:

  • The first character of SS is uppercase, and all other characters are lowercase.

Constraints

  • 1S1001 \leq |S| \leq 100 (S|S| is the length of the string SS.)
  • Each character of SS is an uppercase or lowercase English letter.

Input

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

SS

Output

If the condition is satisfied, print Yes; otherwise, print No.


Sample Input 1Copy

Copy
Capitalized

Sample Output 1Copy

Copy
Yes

The first character C of Capitalized is uppercase, and all other characters apitalized are lowercase, so you should print Yes.


Sample Input 2Copy

Copy
AtCoder

Sample Output 2Copy

Copy
No

AtCoder contains an uppercase letter C that is not at the beginning, so you should print No.


Sample Input 3Copy

Copy
yes

Sample Output 3Copy

Copy
No

The first character y of yes is not uppercase, so you should print No.


Sample Input 4Copy

Copy
A

Sample Output 4Copy

Copy
Yes


2025-04-19 (Sat)
07:45:24 +00:00