Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
  char S[5]={};
  scanf("%d",S);
  char a=S[0];
  char b;
  
  if(S[0]==S[1])
  {
    if(strcmp(S[0],S[2])==0||strcmp(S[0],S[3])==0)
    {
      printf("No");
      return 0;
    }
    else if(strcmp(S[2],S[3]!=0))
    {
      printf("No");
      return 0;
    }
    else
    {
      printf("Yes");
      return 0;
    }
  }
  else
  {
    b=S[1];
    if(strcmp(a,S[2])==0&&strcmp(b,S[3])==0)
    {
      printf("Yes");
      return 0;
    }
    else if(strcmp(a,S[3])==0&&strcmp(b,S[2])==0)
    {
      printf("Yes");
      return 0;
    }
    else
    {
      printf("No");
      return 0;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     if(strcmp(S[0],S[2])==0||strcmp(S[0],S[3])==0)
      |               ~~~^
      |                  |
      |                  char
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     if(strcmp(S[0],S[2])==0||strcmp(S[0],S[3])==0)
      |                    ~~~^
      |                       |
      |                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:12:40: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     if(strcmp(S[0],S[2])==0||strcmp(S[0],S[3])==0)
      |                                     ~~~^
      |                                        |
      |                                        char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:45: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     if(strcmp(S[0],S[2])==0||strcmp(S[0],S[3])==0)
      |                                          ~~~^
      |                                             |
      |                                             char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:17:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |     else if(strcmp(S[2],S[3]!=0))
      |                    ~~~^
      |                       |
      |                       char
a.cc:17:29: error: cannot convert 'bool' to 'const char*'
   17 |     else if(strcmp(S[2],S[3]!=0))
      |                         ~~~~^~~
      |                             |
      |                             bool
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:31:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   31 |     if(strcmp(a,S[2])==0&&strcmp(b,S[3])==0)
      |               ^
      |               |
      |               char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:31:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   31 |     if(strcmp(a,S[2])==0&&strcmp(b,S[3])==0)
      |                 ~~~^
      |                    |
      |                    char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:31:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   31 |     if(strcmp(a,S[2])==0&&strcmp(b,S[3])==0)
      |                                  ^
      |                                  |
      |                                  char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:31:39: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   31 |     if(strcmp(a,S[2])==0&&strcmp(b,S[3])==0)
      |                                    ~~~^
      |                                       |
      |                                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:36:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |     else if(strcmp(a,S[3])==0&&strcmp(b,S[2])==0)
      |                    ^
      |                    |
      |                    char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:36:25: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |     else if(strcmp(a,S[3])==0&&strcmp(b,S[2])==0)
      |                      ~~~^
      |                         |
      |                         char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:36:39: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |     else if(strcmp(a,S[3])==0&&strcmp(b,S[2])==0)
      |                                       ^
      |                                       |
      |                                       char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:36:44: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |     else if(strcmp(a,S[3])==0&&strcmp(b,S[2])==0)
      |                                         ~~~^
      |                                            |
      |                                            char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~