#include <cstdio>

#include <algorithm>

using namespace std;

int a[4];

int main() {
  for (int i = 0; i < 4; ++i)
    scanf("%d", &a[i]);
  sort(a, a + 4);
  puts(a[0] == 1 && a[1] == 4 && a[2] == 7 && a[3] == 9 ? "YES" : "NO");
  return 0;
}
