Language: C++

/*
 * Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
 *       Example:-   $ g++ -std=c++11 c++Template.cpp
 *
 * Author : Denzil Bernard  
 * Handle: 1_mn_RMY
 *
 */
#include<bits/stdc++.h>

using namespace std;

/*******  All Required define Pre-Processors and typedef Constants *******/
#define FOR(i, j, k, in) for (int i=j ; i<k ; i+=in)
#define RFOR(i, j, k, in) for (int i=j ; i>=k ; i-=in)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define IN(A, B, C) assert( B <= A && A <= C)
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define read(type) readInt<type>()
#define ll long long
typedef pair< ll, ll> PII;
typedef vector<ll> VI;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef map<ll,ll> MPII;
typedef set<ll> SETI;
typedef multiset<ll> MSETI;

ll SI(){
    ll x;
    cin>>x;
    return x;
}


/********** Main()  function **********/
int main()
{
    
    
    VI v(4);
    bool a = false, b = false, c = false, d = false;
    REP(i,4){
        v[i] = SI();
        if(v[i]==1){
            a = true;
        }
        if(v[i]==9){
            b = true;
        }
        if(v[i]==7){
            c = true;
        }
        if(v[i]==4){
            d = true;
        }
    }
    if(a&&b&&c&&d){
        cout<<"YES\n";
    }
    else{
        cout<<"NO\n";
    }


    return 0;
}



/*
 * Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
 *       Example:-   $ g++ -std=c++11 c++Template.cpp
 *
 * Author : Denzil Bernard  
 * Handle: 1_mn_RMY
 *
 */
#include<bits/stdc++.h>

using namespace std;

/*******  All Required define Pre-Processors and typedef Constants *******/
#define FOR(i, j, k, in) for (int i=j ; i<k ; i+=in)
#define RFOR(i, j, k, in) for (int i=j ; i>=k ; i-=in)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define IN(A, B, C) assert( B <= A && A <= C)
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define read(type) readInt<type>()
#define ll long long
typedef pair< ll, ll> PII;
typedef vector<ll> VI;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef map<ll,ll> MPII;
typedef set<ll> SETI;
typedef multiset<ll> MSETI;

ll SI(){
    ll x;
    cin>>x;
    return x;
}


/********** Main()  function **********/
int main()
{
    
    
    VI v(4);
    bool a = false, b = false, c = false, d = false;
    REP(i,4){
        v[i] = SI();
        if(v[i]==1){
            a = true;
        }
        if(v[i]==9){
            b = true;
        }
        if(v[i]==7){
            c = true;
        }
        if(v[i]==4){
            d = true;
        }
    }
    if(a&&b&&c&&d){
        cout<<"YES\n";
    }
    else{
        cout<<"NO\n";
    }


    return 0;
}





Compiler output:
a.cc:111:4: error: redefinition of 'long long int SI()'
  111 | ll SI(){
      |    ^~
a.cc:35:4: note: 'long long int SI()' previously defined here
   35 | ll SI(){
      |    ^~
a.cc:119:5: error: redefinition of 'int main()'
  119 | int main()
      |     ^~~~
a.cc:43:5: note: 'int main()' previously defined here
   43 | int main()
      |     ^~~~