{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e逸欣最喜歡英文字母了,一堆字母照一定順序接起來的「字串」當然讓他更喜歡了。但是,傳說中最美麗的字串:「ABC字串」更是逸欣追求的極致!。\u003c/p\u003e\n\u003cp\u003e逸欣最近收到了很多的字母「a」、「b」、「c」,他決定將一些字母組成一個「ABC字串」。 首先,逸欣把數個字母「a」放在字串的最前端,接下來再把數個字母「b」放在所有字母「a」的後面,最後再將數個字母「c」放在字串的最後端。\u003c/p\u003e\n\u003cp\u003e而各字母數量的選擇也是充滿玄機的,若不符合以下的規則,字串就會變得不美麗,也就不算是「ABC字串」了。首先,三種字母至少都要出現一次,字串才能同時擁有三種字母的美。除此之外,為了維護字串的平衡,字元「c」出現的次數需與字元「a」或字元「b」相等。\u003c/p\u003e\n\u003cp\u003e今天逸欣決定送你一個「ABC字串」,但你擔心字串在郵寄到你家的路上被調包了,你決定寫一支程式確認這個字串是否為「ABC字串」。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e輸入僅一行,包含一字串\u003cb\u003eS\u003c/b\u003e。\u003c/p\u003e\n\u003cp\u003e\n\u003cli\u003e1 ≤ |\u003cb\u003eS\u003c/b\u003e| ≤ 5000\u003c/li\u003e\n\u003cli\u003e\u003cb\u003eS\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e ∈ {\u0027a\u0027, \u0027b\u0027, \u0027c\u0027}\u003c/li\u003e\n\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e輸出一行,若字串\u003cb\u003eS\u003c/b\u003e為「ABC字串」,輸出「YES」(不含引號);否則,輸出「NO」(不含引號)。\u003c/p\u003e"}},{"title":"Sample Input 1","value":{"format":"HTML","content":"\u003cpre\u003eaaabccc\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"HTML","content":"\u003cpre\u003eYES\n\u003c/pre\u003e"}},{"title":"Sample Input 2","value":{"format":"HTML","content":"\u003cpre\u003ebbacc\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"HTML","content":"\u003cpre\u003eNO\n\u003c/pre\u003e"}},{"title":"Sample Input 3","value":{"format":"HTML","content":"\u003cpre\u003eaabc\n\u003c/pre\u003e"}},{"title":"Sample Output 3","value":{"format":"HTML","content":"\u003cpre\u003eYES\n\u003c/pre\u003e"}}]}