import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, std.bitmanip; void main() { auto P = readln.chomp.map!(c => (c - '0').to!int).array; P.reverse(); int N = P.length.to!int; if (N == 1) { writeln("No"); return; } foreach (i; 0..N) { if (i == 0 && P[i] >= 2 && P[i] <= 4) continue; else if (i >= 1 && i < N - 1 && P[i] >= 3 && P[i] <= 5) continue; else if (i == N-1 && P[i] == 1) continue; writeln("No"); return; } writeln("Yes"); }