407163: GYM102697 134 Alarming String
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
134. Alarming Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output This problem is worth 10 points.
You define a string to be an alarming string if it contains exactly three "a" characters. Given a string, possibly containing spaces, figure out whether or not it is an alarming string.
InputThe only line of input contains a single string $$$s$$$, consisting of only lowercase characters.
OutputOutput "YES" (no quotes) if the given string is an alarming string, as described above, and "NO" (no quotes) otherwise.
ExamplesInputcoderams competition number elevenOutput
NOInput
aardvarkOutput
YESInput
an apple actually appearedOutput
NO