#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # %% P = int(read()) # %% def solve(P): while P: P, r = divmod(P, 10) if not P: return False if r in [2, 3, 4]: P -= 1 continue return False return True # %% print('Yes' if solve(P) else 'No')