PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SCKT0000002. Ba chữ số tăng dần (Increasing Digits)

Bài tập này chưa được xếp vào lộ trình.

Ba chữ số tăng dần (Increasing Digits)

Increasing Digits

Version: Phuoc Hung OJ Extended

Problem Statement

You are given a positive three-digit integer nn.

Let aa, bb, and cc be the hundreds digit, tens digit, and units digit of nn, respectively. Then

n=100a+10b+c,n = 100a + 10b + c,

where 1≤a≤91 \le a \le 9 and 0≤b,c≤90 \le b,c \le 9.

The digits of nn are strictly increasing if every digit is greater than the digit immediately before it, that is,

a<b<c.a < b < c.

Determine whether the three digits of nn are strictly increasing.

Input

One line containing the integer nn.

Output

Print YES if the three digits of nn are strictly increasing.

Otherwise, print NO.

Subtasks

  • Subtask 1 (20%): 100≤n≤999100 \le n \le 999 and the hundreds digit is smaller than the tens digit.
  • Subtask 2 (30%): 100≤n≤999100 \le n \le 999 and the three digits of nn are pairwise distinct.
  • Subtask 3 (50%): 100≤n≤999100 \le n \le 999, with no additional condition.

Examples

Input

479

Output

YES

Explanation

The digits of 479479 are 44, 77, and 99. Since 4<7<94<7<9, the digits are strictly increasing, so the answer is YES.