#CCBCHMOT0000043. Số gần may mắn (Nearly Lucky Number)

Số gần may mắn (Nearly Lucky Number)

Nearly Lucky Number

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

A lucky digit is 4 or 7. Count how many lucky digits occur in positive n. Print YES if this count is a positive integer consisting only of lucky digits; otherwise print NO. Since n has at most 19 digits, this is equivalent to count 4 or 7.

Input

One positive integer n.

Output

Print exactly YES or NO.

Subtasks

  • Subtask 1 (20%): 1≤n≤9991\le n\le999.
  • Subtask 2 (30%): 1≤n≤1091\le n\le10^9.
  • Subtask 3 (50%): 1≤n≤10181\le n\le10^{18}.

Examples

Example 1

Input

40047

Output

NO

Explanation

There are three lucky digits; 3 is not lucky.

Example 2

Input

7747774

Output

YES

Explanation

All seven digits are lucky, and count 7 is itself lucky.