import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Washoum
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    }

    static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    }

    static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    }

    static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    }

    static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out inputClass in = new inputClass(inputStream); in new inputClass(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) AStationAndBus solver = new AStationAndBus(); solver new AStationAndBus() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    } AStationAndBus public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        } solve {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        } String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int a = 0 a 0 b = 0; b 0 for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            } {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            } if (s.charAt(i) == 'A')
                    a++;
                else
                    b++; s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' a++ a b++ b if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            } a == 3 || b == 3 a == 3 a 3 b == 3 b 3 {
                out.println("No");
            } out.println("No") out.println out "No" {
                out.println("Yes");
            } out.println("Yes") out.println out "Yes" int testNumber testNumber inputClass sc sc PrintWriter out out static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    } inputClass BufferedReader br; br public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        } inputClass {

            br = new BufferedReader(new InputStreamReader(in));
        } br = new BufferedReader(new InputStreamReader(in)) br new BufferedReader(new InputStreamReader(in)) InputStream in in public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    }

    static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    }

    static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    }

    static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    }

    static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Washoum
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AStationAndBus solver = new AStationAndBus();
        solver.solve(1, in, out);
        out.close();
    }

    static class AStationAndBus {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            String s = sc.nextLine();
            int a = 0, b = 0;
            for (int i = 0; i < 3; i++) {
                if (s.charAt(i) == 'A')
                    a++;
                else
                    b++;
            }
            if (a == 3 || b == 3) {
                out.println("No");
            } else {
                out.println("Yes");
            }
        }

    }

    static class inputClass {
        BufferedReader br;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

