#KEYENCE2019A. Beginning

Beginning

Score : 100100 points

Problem Statement

You are given four digits N1,N2,N3N_1, N_2, N_3 and N4N_4. Determine if these can be arranged into the sequence of digits "19741974".

Constraints

  • 0N1,N2,N3,N490 \leq N_1, N_2, N_3, N_4 \leq 9
  • N1,N2,N3N_1, N_2, N_3 and N4N_4 are integers.

Input

Input is given from Standard Input in the following format:

N1N_1 N2N_2 N3N_3 N4N_4

Output

If N1,N2,N3N_1, N_2, N_3 and N4N_4 can be arranged into the sequence of digits "19741974", print YES; if they cannot, print NO.

1 7 9 4
YES

We can get 19741974 by swapping N2N_2 and N3N_3.

1 9 7 4
YES

We already have 19741974 before doing anything.

1 2 9 1
NO
4 9 0 8
NO