A magic number is a number formed by concatenation of numbers 1, 14 and 144. We can use each of these numbers any number of times. Therefore 14144, 141414 and 1411 are magic numbers but 1444, 514 and 414 are not.

You're given a number. Determine if it is a magic number or not.

Input

The first line of input contains an integer n, (1 ≤ n ≤ 109). This number doesn't contain leading zeros.

Output

Print "YES" if n is a magic number or print "NO" if it's not.

Examples

Input

114114


Output

YES


Input

1111


Output

YES


Input

441231


Output

NO
#!/usr/bin/python

import os
import sys
import itertools
import re

r = re.compile("^(14?4?)+$")

def solve(f):
    return "YES" if r.match(f.read_str()) else "NO"



class Reader(object):
    def __init__(self, filename=None):
        if filename: self.f = open(filename)
        else: self.f = sys.stdin

    def read_int(self):
        return int(self.f.readline().strip())
    def read_float(self):
        return float(self.f.readline().strip())
    def read_long(self):
        return long(self.f.readline().strip())
    def read_str(self):
        return self.f.readline().strip()

    def read_int_list(self):
        return [int(item) for item in self.f.readline().split()]
    def read_float_list(self):
        return [float(item) for item in self.f.readline().split()]
    def read_long_list(self):
        return [long(item) for item in self.f.readline().split()]
    def read_str_list(self):
        return self.f.readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv)>1 else None
    f = Reader(filename)
    print solve(f)
