import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.lang.Integer;
import java.util.HashMap;

class Main
{
    // driver function to test the above functions
    public static void main(String args[]) throws IOException
    {
        Reader.init(System.in);
        String s = Reader.next();
        char[] arr = s.toCharArray();
        int ans_b=0;
        for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        }

        if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        }

    }

}

class solu{

}

/** Class for buffered reading int and double values */
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util import java.util.Scanner; Scanner java.util import java.lang.*; lang.* java import java.io.*; io.* java import java.util.*; util.* java import java.lang.Integer; Integer java.lang import java.util.HashMap; HashMap java.util class Main
{
    // driver function to test the above functions
    public static void main(String args[]) throws IOException
    {
        Reader.init(System.in);
        String s = Reader.next();
        char[] arr = s.toCharArray();
        int ans_b=0;
        for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        }

        if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        }

    }

} Main // driver function to test the above functions
    public static void main(String args[]) throws IOException
    {
        Reader.init(System.in);
        String s = Reader.next();
        char[] arr = s.toCharArray();
        int ans_b=0;
        for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        }

        if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        }

    } main {
        Reader.init(System.in);
        String s = Reader.next();
        char[] arr = s.toCharArray();
        int ans_b=0;
        for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        }

        if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        }

    } Reader.init(System.in) Reader.init Reader System.in System System.in String s = Reader.next(); s Reader.next() Reader.next Reader char[] arr = s.toCharArray(); arr s.toCharArray() s.toCharArray s int ans_b=0; ans_b 0 for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        } {
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        } char val= arr[i]; val arr[i] arr i if (val=='B'){
                ans_b++;
            } val=='B' val 'B' {
                ans_b++;
            } ans_b++ ans_b if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        } ans_b==1 || ans_b==2 ans_b==1 ans_b 1 ans_b==2 ans_b 2 {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String args[] args class solu{

} solu class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
} Reader static BufferedReader reader; reader static StringTokenizer tokenizer; tokenizer /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    } init {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    } reader = new BufferedReader(
                new InputStreamReader(input) ) reader new BufferedReader(
                new InputStreamReader(input) ) tokenizer = new StringTokenizer("") tokenizer new StringTokenizer("") InputStream input input /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    } next {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    } while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        } ! tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        } tokenizer = new StringTokenizer(
                    reader.readLine() ) tokenizer new StringTokenizer(
                    reader.readLine() ) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    } nextInt {
        return Integer.parseInt( next() );
    } return Integer.parseInt( next() ); Integer.parseInt( next() ) Integer.parseInt Integer next() next static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    } nextDouble {
        return Double.parseDouble( next() );
    } return Double.parseDouble( next() ); Double.parseDouble( next() ) Double.parseDouble Double next() next
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.lang.Integer;
import java.util.HashMap;

class Main
{
    // driver function to test the above functions
    public static void main(String args[]) throws IOException
    {
        Reader.init(System.in);
        String s = Reader.next();
        char[] arr = s.toCharArray();
        int ans_b=0;
        for (int i=0; i<3; i++){
            char val= arr[i];
            if (val=='B'){
                ans_b++;
            }
        }

        if (ans_b==1 || ans_b==2){
            System.out.println("Yes");
        }

        else{
            System.out.println("No");
        }

    }

}

class solu{

}

/** Class for buffered reading int and double values */
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}