Language: C++

#include <bits/stdc++.h>

int main(){
	int a, b, c, d;
  	int inputNumber;
  	cin >> inputNumber;
  
  	d = inputNumber % 10;
  	inputNumber /= 10;
  	c = inputNumber % 10;
  	inputNumber /= 10;
  	b = inputNumber % 10;
  	inputNumber /= 10;
  	a = inputNumber;

  
  	if (b != c) {
    	cout << "No" << endl;
    } else if (a != b) {
    	if (c != d) {
        	cout << "No" << endl;
        } else {
        	cout << "Yes" << endl;
        }
    } else {
    	cout << "Yes" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> inputNumber;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |         cout << "No" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |         cout << "No" << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:21:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                 cout << "No" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |                 cout << "No" << endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:23:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |                 cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |                 cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:26:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |         cout << "Yes" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |         cout << "Yes" << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~