Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  if((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 == (((N%1000)%100)%10) ||
      ((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 != (((N%1000)%100)%10) ||
        ((N/1000 == (N%1000)/100  == (((N%1000)%100)%10 != ((N%1000)%100)/10) ||
          ((N/1000  == ((N%1000)%100)/10 == (((N%1000)%100)%10 != (N%1000)/100) ||
              (( ((N%1000)%100)/10 == (((N%1000)%100)%10 == (N%1000)/100 ==N/1000 ) ||
      {
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: expected primary-expression before '{' token
   12 |       {
      |       ^
a.cc:11:87: error: expected ')' before '{' token
   11 |               (( ((N%1000)%100)/10 == (((N%1000)%100)%10 == (N%1000)/100 ==N/1000 ) ||
      |                ~                                                                      ^
      |                                                                                       )
   12 |       {
      |       ~                                                                                
a.cc:14:4: error: expected ')' before 'else'
   14 |   }
      |    ^
      |    )
   15 |   else{
      |   ~~~~
a.cc:11:15: note: to match this '('
   11 |               (( ((N%1000)%100)/10 == (((N%1000)%100)%10 == (N%1000)/100 ==N/1000 ) ||
      |               ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:10:12: note: to match this '('
   10 |           ((N/1000  == ((N%1000)%100)/10 == (((N%1000)%100)%10 != (N%1000)/100) ||
      |            ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:10:11: note: to match this '('
   10 |           ((N/1000  == ((N%1000)%100)/10 == (((N%1000)%100)%10 != (N%1000)/100) ||
      |           ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:9:10: note: to match this '('
    9 |         ((N/1000 == (N%1000)/100  == (((N%1000)%100)%10 != ((N%1000)%100)/10) ||
      |          ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:9:9: note: to match this '('
    9 |         ((N/1000 == (N%1000)/100  == (((N%1000)%100)%10 != ((N%1000)%100)/10) ||
      |         ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:8:8: note: to match this '('
    8 |       ((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 != (((N%1000)%100)%10) ||
      |        ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:8:7: note: to match this '('
    8 |       ((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 != (((N%1000)%100)%10) ||
      |       ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:7:6: note: to match this '('
    7 |   if((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 == (((N%1000)%100)%10) ||
      |      ^
a.cc:17:4: error: expected ')' before '}' token
   17 |   }
      |    ^
      |    )
   18 | }
      | ~   
a.cc:7:5: note: to match this '('
    7 |   if((N/1000 == (N%1000)/100 == ((N%1000)%100)/10 == (((N%1000)%100)%10) ||
      |     ^
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^