Language: C++


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;


class Main{
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String n =  in.next();
        char[] ch = n.toCharArray();
        int length = ch.length;
        char key =  ch[0];
        boolean flag = false;
        for (int j = 1 ; j < length ; j++){
            if(key!=ch[j]) {
                flag = true;
                break;
            }
        }
        if(flag)
            System.out.print("Yes");
        else
            System.out.print("No");



    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStream;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.StringTokenizer;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:11: error: expected ':' before 'static'
   11 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:11:29: error: 'String' has not been declared
   11 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:11:38: error: expected ',' or '...' before 'args'
   11 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:36:15: error: expected ':' before 'BufferedReader'
   36 |         public BufferedReader reader;
      |               ^~~~~~~~~~~~~~~
      |               :
a.cc:36:16: error: 'BufferedReader' does not name a type
   36 |         public BufferedReader reader;
      |                ^~~~~~~~~~~~~~
a.cc:37:15: error: expected ':' before 'StringTokenizer'
   37 |         public StringTokenizer tokenizer;
      |               ^~~~~~~~~~~~~~~~
      |               :
a.cc:37:16: error: 'StringTokenizer' does not name a type
   37 |         public StringTokenizer tokenizer;
      |                ^~~~~~~~~~~~~~~
a.cc:39:15: error: expected ':' before 'InputReader'
   39 |         public InputReader(InputStream stream) {
      |               ^~~~~~~~~~~~
      |               :
a.cc:39:39: error: expected ')' before 'stream'
   39 |         public InputReader(InputStream stream) {
      |                           ~           ^~~~~~~
      |                                       )
a.cc:44:15: error: expected ':' before 'String'
   44 |         public String next() {
      |               ^~~~~~~
      |               :
a.cc:44:16: error: 'String' does not name a type
   44 |         public String next() {
      |                ^~~~~~
a.cc:55:15: error: expected ':' before 'int'
   55 |         public int nextInt() {
      |               ^~~~
      |               :
a.cc:59:6: error: expected ';' after class definition
   59 |     }
      |      ^
      |      ;
a.cc:35:5: error: a storage class can only be specified for objects and functions
   35 |     static class InputReader {
      |     ^~~~~~
a.cc:60:2: error: expected ';' after class definition
   60 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:12:42: error: 'System' was not declared in this scope
   12 |         InputReader in = new InputReader(System.in);
      |                                          ^~~~~~
a.cc:13:9: error: 'PrintWriter' was not declared in this scope
   13 |         PrintWriter out = new PrintWriter(System.out);
      |         ^~~~~~~~~~~
a.cc:15:9: error: 'String' was not declared in this scope
   15 |         String n =  in.next();
      |         ^~~~~~
a.cc:16:13: error: structured binding declaration cannot have type 'char'
   16 |         char[] ch = n.toCharArray();
      |             ^~
a.cc:16:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:13: error: empty structured binding declaration
a.cc:16:16: error: expected initializer before 'ch'
   16 |         char[] ch = n.toCharArray();
      |                ^~
a.cc:17:22: error: 'ch' was not declared in this scope; did you mean 'char'?
   17 |         int length = ch.length;
      |                      ^~
      |                      char
a.cc:19:9: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   19 |         boolean flag = false;
      |         ^~~~~~~
      |         bool
a.cc:22:17: error: 'flag' was not declared in this scope
   22 |                 flag = true;
      |                 ^~~~
a.cc:26:12: error: 'flag' was not declared in this scope
   26 |         if(flag)
      |            ^~~~
a.cc: In member function 'int Main::InputReader::nextInt()':
a.cc:56:20: error: 'Integer' was not declared in this scope
   56 |             return Integer.parseInt(next());
      |                    ^~~~~~~
a.cc:56:37: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   56 |             return Integer.parseInt(next());
      |                                     ^~~~
      |                                     nextInt