You're given a row with n chairs. We call a seating of people "maximal" if the two following conditions hold:

  1. There are no neighbors adjacent to anyone seated. 
  2. It's impossible to seat one more person without violating the first rule. 



The seating is given as a string consisting of zeros and ones (0 means that the corresponding seat is empty, 1 — occupied). The goal is to determine whether this seating is "maximal".

Note that the first and last seats are not adjacent (if n ≠ 2).

Input

The first line contains a single integer n (1 ≤ n ≤ 1000) — the number of chairs.

The next line contains a string of n characters, each of them is either zero or one, describing the seating.

Output

Output "Yes" (without quotation marks) if the seating is "maximal". Otherwise print "No".

You are allowed to print letters in whatever case you'd like (uppercase or lowercase).

Examples

Input

3
101


Output

Yes


Input

4
1011


Output

No


Input

5
10001


Output

No

Note

In sample case one the given seating is maximal.

In sample case two the person at chair three has a neighbour to the right.

In sample case three it is possible to seat yet another person into chair three.
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class CF484C {
	static List<Integer>[] gr;

	static long[] arr;
	static long n, m, p, q, k, ans;
	static boolean b = true;

	public static void main(String[] args) {
		n = in.nextLong();
		// arr = new long[(int) n];
		// m = in.nextLong();
		// p = in.nextLong();
		// q = in.nextLong();
		// k = in.nextLong();
		// for (int i = 0; i < n; i++) {
		// arr[i] = in.nextLong();
		// }
		// gr = readGraph(DIRECTED, (int) n);
		// out.println(b ? "YES" : "NO");
		// out.println(ans);
		String s = in.next();
		int len = 0, len1 = 0;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == '1') {
				len1++;
				len = 0;
			} else {
				len1 = 0;
				len++;
			}
			if (len1 == 2) {
				b = false;
			}
			if (len == 3) {
				b = false;
			}
		}
		if (s.length() == 1) {
			if (s.charAt(0) == '0') {
				b = false;
			}
		}
		if (s.length() >= 2) {
			if (s.charAt(s.length() - 1) == s.charAt(s.length() - 2) && s.charAt(s.length() - 2) == '0') {
				b = false;
			}
			if (s.charAt(0) == s.charAt(1) && s.charAt(0) == '0') {
				b = false;
			}
		}
		if (b) {
			out.print("Yes");
		} else {
			out.println("No");
		}
		out.close();
	}

	static MyScanner in = new MyScanner();
	static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

	static boolean valid(int[][] arr, int x, int y) {
		return x >= 0 && y >= 0 && x < arr.length && y < arr[0].length;
	}

	static int[] d1 = { -1, -1, -1, 1, 1, 1, 0, 0 };
	static int[] d2 = { 1, 0, -1, 0, -1, 1, -1, 1 };

	static int DIRECTED = 1, UNDIRECTED = 0;

	static boolean check(long m) {
		return true;
	}

	static long binSearch(long l, long r) {
		long ans = -1, mid = 0;
		while (l != r) {
			mid = (l + r) / 2;
			if (check(mid)) {
				ans = mid;
				l = mid + 1;
			} else {
				r = mid;
			}
		}
		return ans;
	}

	static void dfsTree(int root, int parent) {
		for (int child : gr[root]) {
			if (child == parent) {
				continue;
			}
			dfsTree(child, root);
		}
	}

	static List<Integer>[] readGraph(int dir, int n) {
		List<Integer>[] gr;
		gr = new ArrayList[(int) (n + 1)];
		for (int i = 1; i <= n; i++) {
			gr[i] = new ArrayList();
		}
		for (int i = 1; i < n; i++) {
			int u = in.nextInt(), v = in.nextInt();
			gr[v].add(u);
			if (dir == UNDIRECTED) {
				gr[u].add(v);
			}
		}
		return gr;
	}

	public static long gcd(long a, long b) {
		while (b != 0) {
			long t = b;
			b = a % b;
			a = t;
		}
		return Math.abs(a);
	}

	public static long lcm(long a, long b) {
		return Math.abs(a / gcd(a, b) * b);
	}

	static class Pair implements Comparable<Pair> {
		long a, b;

		public Pair(long a, long b) {
			this.a = a;
			this.b = b;
		}

		@Override
		public int compareTo(Pair arg0) {
			return a == b ? 0 : (a > b ? 1 : -1);
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + (int) (a ^ (a >>> 32));
			result = prime * result + (int) (b ^ (b >>> 32));
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Pair other = (Pair) obj;
			if (a != other.a)
				return false;
			if (b != other.b)
				return false;
			return true;
		}
	}

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}