Problem:
Score : 100 points

Problem Statement

In AtCoder City, there are three stations numbered 1, 2, and 3.

Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is A, Company A operates Station i; if S_i is B, Company B operates Station i.

To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.

Determine if there is a pair of stations that will be connected by a bus service.

Constraints

Each character of S is A or B.

|S| = 3

Input

Input is given from Standard Input in the following format:

S

Output

If there is a pair of stations that will be connected by a bus service, print Yes; otherwise, print No.

Sample Input 1

ABA

Sample Output 1

Yes

Company A operates Station 1 and 3, while Company B operates Station 2.

There will be a bus service between Station 1 and 2, and between Station 2 and 3, so print Yes.

Sample Input 2

BBA

Sample Output 2

Yes

Company B operates Station 1 and 2, while Company A operates Station 3.

There will be a bus service between Station 1 and 3, and between Station 2 and 3, so print Yes.

Sample Input 3

BBB

Sample Output 3

No

Company B operates all the stations. Thus, there will be no bus service, so print No.

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

/*********************************************
* 20.05.08 AtCoder Beginner Contest 159. F - Banned K* 
* 
*
*********************************************/
/*********************************************
::test input::
*********************************************/

namespace TempName{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.Reflection;
    using static System.Console;
    using static IOmacro.CsharpInput; 
    using static IOmacro.CppInput;
    

    public class CRun{
        public readonly char problem_num = 'A';
        
        public void solve_1() {
            //A. Station and Bus
            
            string input = _string;
            
            string ans = "No";
            for (int i = 1; i < input.Length; i++) {
                if (input[i] != input[i-1]) {
                    ans = "Yes";
                    break;
                }
            }
            WriteLine(ans);
        }
        public void solve_2() {
            
        }
        public void solve_3() {
            
        }
    }
    
    class Program { 
        static void Main() { 
            var run = new CRun();
            if (run.problem_num == 'A') run.solve_1(); 
            if (run.problem_num == 'B') run.solve_2(); 
            if (run.problem_num == 'C') run.solve_3();
        } 
    }
}

namespace IOmacro {
    //20.05.08. 수정
    
    using System; 
    using System.Linq; 
    using System.IO;
    using System.Collections.Generic;
    
    public class CsharpInput {
        public static StreamWriter _writer = new StreamWriter(Console.OpenStandardOutput());
        public const char separator = ' ';
        public static string _string{get{return Console.ReadLine();}}
        public static string[] _stringa{get{return (Console.ReadLine().Split(separator));}}
        public static int _int{get{return int.Parse(Console.ReadLine());}}
        public static int[] _inta{get{return Console.ReadLine().Split(separator).Select(int.Parse).ToArray();}}
        public static long _long{get{return long.Parse(Console.ReadLine());}}
        public static long[] _longa{get{return Console.ReadLine().Split(separator).Select(long.Parse).ToArray();}}    
        public static double _double{get{return double.Parse(Console.ReadLine());}}
        public static double[] _doublea{get{return Console.ReadLine().Split(separator).Select(double.Parse).ToArray();}}    
    }
    
    public class CConst {
        public static readonly int MINI = int.MaxValue;
        public static readonly long INF = Int64.MaxValue;
    }
    
    public class CppInput {
        public static CppInput cin => new CppInput();
        public const char separator = ' ';
        private static readonly Queue<string> _input = new Queue<string>();
        private CppInput(){}
        public static implicit operator string(CppInput _) {
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return _input.Dequeue();
        }
        public static implicit operator int(CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return int.Parse(_input.Dequeue());
        }
        public static implicit operator long(CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return long.Parse(_input.Dequeue());
        }
        public static implicit operator double(CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return double.Parse(_input.Dequeue());
        }
    }
    
    public static class EnumerableExtension {
        public delegate void Function<in T>(T val);
        public static void foreachExtension<T>(this IEnumerable<T> enumerable, Function<T> function) {
            foreach (var x in enumerable) function(x);
        }
    }
}