using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 競プロ1 { using static Console; class Program { static void Main(string[] args) { var Input = ReadLine(); var Count = 0; for (int i = 0; i < Input.Length; i++) { if (Input.Contains(Input[i])) Count++; if (Count == 2) { WriteLine("NO"); return; } else Count = 0; } WriteLine("YES"); } } }