#C9454. Construct a String with Exactly X Distinct Characters
Construct a String with Exactly X Distinct Characters
Construct a String with Exactly X Distinct Characters
Given two integers (x) and (y), determine whether it is possible to construct a string of length (y) that contains exactly (x) distinct characters. A necessary and sufficient condition is (y \geq x).
For example, if (x = 3) and (y = 5), it is possible to construct such a string (e.g. "abcab"), so you should output "YES". If (x = 5) and (y = 2), it is impossible, so output "NO".
inputFormat
The input consists of a single line containing two integers (x) and (y), separated by a space, where (x) is the number of distinct characters and (y) is the total length of the string.
outputFormat
Output a single line with the string "YES" if it is possible to construct the string with exactly (x) distinct characters, or "NO" otherwise.## sample
3 5
YES