B - Perfect String Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 200

問題文

英大文字と英小文字からなる文字列のうち、以下の条件を全て満たすものを素晴らしい文字列ということとします。

  • 英大文字が文字列の中に現れる。
  • 英小文字が文字列の中に現れる。
  • 全ての文字が相異なる。

例えば、AtCoderAa は素晴らしい文字列ですが、atcoderPerfect は素晴らしい文字列ではありません。

文字列 S が与えられるので、S が素晴らしい文字列か判定してください。

制約

  • 1 \le |S| \le 100
  • S は英大文字と英小文字からなる文字列である。

入力

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

S

出力

S が素晴らしい文字列ならば Yes を、そうでないならば No を出力せよ。


入力例 1

AtCoder

出力例 1

Yes

AtCoder は、英大文字が含まれ、英小文字も含まれ、かつ全ての文字が相異なるため素晴らしい文字列です。


入力例 2

Aa

出力例 2

Yes

Aa は違う文字であることに注意してください。この文字列は素晴らしい文字列です。


入力例 3

atcoder

出力例 3

No

英大文字が含まれていないため、素晴らしい文字列ではありません。


入力例 4

Perfect

出力例 4

No

2 文字目と 5 文字目が等しいため、素晴らしい文字列ではありません。

Score : 200 points

Problem Statement

Let us call a string consisting of uppercase and lowercase English alphabets a wonderful string if all of the following conditions are satisfied:

  • The string contains an uppercase English alphabet.
  • The string contains a lowercase English alphabet.
  • All characters in the string are pairwise distinct.

For example, AtCoder and Aa are wonderful strings, while atcoder and Perfect are not.

Given a string S, determine if S is a wonderful string.

Constraints

  • 1 \le |S| \le 100
  • S is a string consisting of uppercase and lowercase English alphabets.

Input

Input is given from Standard Input in the following format:

S

Output

If S is a wonderful string, print Yes; otherwise, print No.


Sample Input 1

AtCoder

Sample Output 1

Yes

AtCoder is a wonderful string because it contains an uppercase English alphabet, a lowercase English alphabet, and all characters in the string are pairwise distinct.


Sample Input 2

Aa

Sample Output 2

Yes

Note that A and a are different characters. This string is a wonderful string.


Sample Input 3

atcoder

Sample Output 3

No

It is not a wonderful string because it does not contain an uppercase English alphabet.


Sample Input 4

Perfect

Sample Output 4

No

It is not a wonderful string because the 2-nd and the 5-th characters are the same.