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.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.sql.Time;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
import javafx.util.Pair;

public class Main implements Runnable{
		
		 public static void main(String[] args) throws IOException {
			new Thread(null , new Main(),"Main", 1<<26).start();
			
		 }
		 
		 
		public void run(){
			try {
			PrintWriter out = new PrintWriter(System.out);
			MyScanner sc = new MyScanner();
			solve(out, sc);
			out.close();
			}
			catch (Exception e) {
				e.printStackTrace();
				
			}
		}
	
		
		
		
		void solve(PrintWriter out, MyScanner sc) throws IOException{	
			
		/*	int n = sc.nextInt();
			int q = sc.nextInt();
			int[] a = new int[n];
			for(int i = 0 ; i < n ; ++i	) {
				a[i] = sc.nextInt();
			}
			
			Segment_tree sg = new Segment_tree(a);
			sg.build(1, 0, n - 1);
			while(q-- > 0) {
				char c = sc.next().charAt(0);
				if(c == 'q') {
					int l = sc.nextInt() - 1;
					int r = sc.nextInt() - 1;
					out.println(sg.query(1, 0, n - 1, l, r));
				}else {
					int index = sc.nextInt() - 1;
					int val = sc.nextInt();
					sg.update(1, 0, n - 1, index, val);
				}
			}*/
			
			int len = sc.nextInt();
			String s = sc.next();
			if(s.length() == 1) {
				if(s.charAt(0) == '0') {
					out.print("No");
				}else {
					out.println("Yes");
				}
			}else {
				if(s.charAt(0) == '0' && s.charAt(1) == '0') {
					out.println("No");
					return;
				}
				
				if(s.charAt(0) == '1' && s.charAt(1) == '1') {
					out.println("No");
					return;
				}
				
				if(s.charAt(len - 1) == '0' && s.charAt(len - 2) == '0') {
					out.println("No");
					return;
				}
				
				
				for(int i = 1; i < s.length() - 1 ; ++i) {
					if(s.charAt(i) == '0') {
						if(s.charAt(i - 1) == '0' && s.charAt(i + 1) == '0') {
							out.println("No");
							return;
						}
					}else {
						if(s.charAt(i + 1) == '1' ||  s.charAt(i - 1) == '1') {
							out.println("No");
							return;
						}
					}
				}
				out.println("Yes");
			}
			
		}
			
			
			
			
		public static  class Segment_tree {

			private int[] tree;
			private int[] a;
			
			public Segment_tree(int[] a) {
				this.a = a;
				tree = new int[(int)1e5 +5];
			}
			
			
			
			public void build(int node, int start, int end) {
				
				if(start == end) tree[node] = a[start];
				else {
					int mid = (start + end ) / 2;
					build(2 * node, start, mid);
					build(2 * node + 1, mid + 1, end);
					tree[node] = Math.min(tree[2 * node]  , tree[node * 2  +  1]);
				}
				
			}
			
			
			public void update(int node, int start, int end, int index , int val) {
				
				if(start == end) {
					a[index] = val;
					tree[node] = val;
							
				}
				else {
					int mid = (start + end) / 2;
					if(index <= end && index >= mid + 1) {
						update(2 * node  + 1, mid + 1, end, index, val);
					}else {
						update(2 * node, start, mid, index, val);
					}
					
					tree[node] = Math.min(tree[2 * node]  , tree[node * 2  +  1]);
				}		
			
			}
			
			
			public int query(int node, int start, int end, int l, int r) {
				
				if(l <= start && r >= end ) return tree[node];
				else if(r < start || l > end) return Integer.MAX_VALUE;
				else { 
					int	 mid = (start + end) / 2;
					int p1 = query(2 * node, start, mid, l, r);
					int p2 = query(2 * node + 1, mid + 1, end, l, r);
					return  Math.min(p1, p2);

							
				}
				
				
			}
		}

			
			
			
					
		
		
		
		
				
		
		
		
		
		
		
	


}


 class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}



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;
    }
    

}



