import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] n = sc.next().toCharArray();
		sc.close();

		int[] c = new int[2];
		for (int i = 0; i < n.length; i++) {
			c[n[i] - '0']++;
		}

		if (c[1] == 2) {
			System.out.println("Yes");
		} else if (c[1] > 2) {
			boolean flg = true;
			for (int i = 0; i < n.length; i++) {
				if (n[i] == '0') {
					flg = false;
				} else if (!flg) {
					System.out.println("No");
					return;
				}
			}
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}