import java.util.Scanner; import java.util.Arrays; import java.util.ArrayDeque; import java.util.Queue; import java.util.LinkedList; public class Main { public static void main(String[] args) { new Main().solve(); } void solve() { Scanner sc = new Scanner(System.in); int p = sc.nextInt(); int val = String.valueOf(p).length(); boolean ans = true; for (int i = 0; i < val && ans == true; i++) { if (i == 0) { if (p / (int) Math.pow(10, val - 1) != 1) { ans = false; break; } continue; } if (i == val - 1) { if (p % 10 == 2 || p % 10 == 3 || p % 10 == 4) { continue; } else { ans = false; break; } } if (p / (int) Math.pow(10, val - 1 - i) % 10 == 4 || p / (int) Math.pow(10, val - 1 - i) % 10 == 3 || p / (int) Math.pow(10, val - 1 - i) % 10 == 5) { ans = true; continue; } else { ans = false; break; } } if (ans == false) { System.out.println("No"); } else { System.out.println("Yes"); } } }