#include<bits/stdc++.h>
using namespace std;
int main(){

    int a[4];
    cin>>a[0]>>a[1]>>a[2]>>a[3];
    sort(a, a+4);
    if(a[0] == 1 and a[1] == 4 and a[2] == 7 and a[3] == 9){
        cout<<"YES\n";
    }
    else{
        cout<<"NO\n";
    }
}
