#include <bits/stdc++.h>
using namespace std;
const int NUM[4] = {1, 9, 7, 4};
int main() {
  int iNum[4] = {0};
  int total = 0;
  for (int j = 0; j < 4; j++) {
    scanf("%d", &iNum[j]);
    for (int i = 0; i < 4; i++) {
      if (iNum[j] == NUM[i]) {
        total++;
      }
    }
  }
  if (total == 4) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
