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.
	// Code Author: Shrey Shah
	// Institute : DA-IICT
	// Quote : Think twice , Code Once
	 
	import java.io.*;
	import java.util.*;

	public class Tester2 {
	
		static double eps=(double)1e-6;
		static long mod=(int)1e9+7;
		static int[] cost;
		static ArrayList<Integer>[] list;
		static int ans=Integer.MAX_VALUE;
		static boolean[] visited;
		public static void main(String args[]){
			InputReader sc = new InputReader(System.in);
			OutputStream outputStream = System.out;
			PrintWriter out = new PrintWriter(outputStream);
			//----------My Code----------
				int n = sc.nextInt();
				String s = sc.nextLine();	
					boolean isAdjacent=false;
					for(int i=0;i<s.length()-1;i++)
					{
						if(s.charAt(i)=='1' && s.charAt(i+1)=='1')
						{
							isAdjacent=true;
							break;
						}
					}
					if(!isAdjacent)
					{
						
						int left=0;
						int right=0;
						boolean isMaximal=true;
						
						left = s.indexOf('1');
						//out.print(left);
						if(left>1 || left==-1)
							isMaximal=false;
						for(int i=left+1;i<s.length();i++)
						{
							if(s.charAt(i)=='1')
							{
								right=i;
								break;
							}
						}
						
						int temp = right-left;
						if(temp>3)
							isMaximal=false;
						for(int i=right;i<s.length();i++)
						{
							if(s.charAt(i)=='1')
							{
								left=right;
								right=i;
								if((right-left)>3)
									isMaximal=false;
							}
						}
						int count = 0;
						for(int i=s.length()-1;i>=0;i--)
							if(s.charAt(i)!='0')
								break;
							else
								count++;
						if(count>=2)
							isMaximal=false;
						
						if(isMaximal==true)
							out.print("Yes");
						else
							out.print("No");
						
					}
					else
						out.println("No");
				//---The End-----------------
			out.close();
			
		}
		private static int ans(int[][] a, Pair source, Pair dest,int n,int m) {
			if(a[source.x][source.y]==0 || a[dest.x][dest.y]==0)
				return -1;
			boolean visited[][] =new boolean[n][m];
			for(int i=0;i<n;i++)
			{
				for(int j=0;j<m;j++)
					visited[i][j]=false;
			}
			visited[source.x][source.y]=true;
			Queue<Nd> q = new LinkedList<Nd>();
			Nd s = new Nd(source,0);
			q.add(s);
			while(!q.isEmpty())
			{
				Nd x = q.poll();
				Pair p = x.p;
				if(p.x==dest.x && p.y==dest.y)
					return x.dist;
				int rowNum[] = {-1, 0, 0, 1};
				int colNum[] = {0, -1, 1, 0};
				
				for (int i = 0; i < 4; i++)
		        {
		            int row = p.x + rowNum[i];
		            int col = p.y + colNum[i];
		            if (isValid(row, col,n,m) && a[row][col]==1 && !visited[row][col])
		            {
		                visited[row][col] = true;
		                Pair w = new Pair(row,col);
		                Nd Adjcell = new Nd(w,x.dist + 1);
		                q.add(Adjcell);
		            }
		        }	
			}	
			return -1;
		}
		static boolean isValid(int row, int col,int n,int m)
		{
		    return (row >= 0) && (row < n) && (col >= 0) && (col < m);
		}
		static int[] spf(int n)
		{
		    int spf[] = new int[n+1];
		    Arrays.fill(spf,0);
		    spf[1] = 1;
		 
		    for (int i = 2; i <= n; i++)
		    {
		        if (spf[i] == 0)
		        {
		            spf[i] = i;
		            for (int j = 2*i; j <= n; j += i)
		                if (spf[j] == 0)
		                   spf[j] = i;
		            
		        }  
		    }
		    return spf;
		}
		
		static void dfs(int v,int temp)
		{
			visited[v]=true;
			temp=(int)gcd(temp,cost[v]);
			int count=0;
			for(int i=0;i<list[v].size();i++)
			{
				
				int u=list[v].get(i);
				if(!visited[u])
				{
					count++;
					dfs(u,temp);
				}
			}
			if(count==0)
				ans=Math.min(ans,temp);
		}
		static int power(int x,int n)
		{
		    if(n==0)
		        return 1;
		    else if(n%2 == 0)        //n is even
		        return power(x*x,n/2);
		    else                             //n is odd
		        return x*power(x*x,(n-1)/2);
		}
		 static long ce(long x)
			{
				if(x%2!=0)
					return x/2+1;
				return x/2;
			}
		static boolean isSubSequence(String str1, String str2, int m, int n)
		{
		   int j = 0;
		   for (int i=0; i<n&&j<m; i++)
		       if (str1.charAt(j) == str2.charAt(i))
		         j++;
		 
		   return (j==m);
		}
			
		static long fibo(long l) {
	        if (l < 0) {
	            throw new IllegalArgumentException("The fibo value cannot be negative");
	        }
	
	        if (l <= 1) return l;
	
	        long[][] result = {{1, 0}, {0, 1}}; // identity matrix.
	        long[][] fiboM = {{1, 1}, {1, 0}};
	
	        while (l > 0) {
	            if (l%2 == 1) {
	                multMatrix(result, fiboM);
	            }
	            l = l / 2;
	            multMatrix(fiboM, fiboM);
	        }
	
	        return result[1][0];
	    }
	
	    private static void multMatrix(long[][] result, long[][] fiboM) {
	        long a = (result[0][0]%mod * fiboM[0][0]%mod)%mod +  (result[0][1]%mod * fiboM[1][0]%mod)%mod;
	        long b = (result[0][0]%mod * fiboM[0][1]%mod)%mod + ( result[0][1]%mod * fiboM[1][1]%mod)%mod;
	        long c = (result[1][0]%mod * fiboM[0][0]%mod)%mod + ( result[1][1]%mod * fiboM[0][1]%mod)%mod;
	        long d = (result[1][0]%mod * fiboM[0][1]%mod)%mod +  (result[1][1]%mod * fiboM[1][1]%mod)%mod;
	
	        result[0][0] = a;
	        result[0][1] = b;
	        result[1][0] = c;
	        result[1][1] = d;
	    }
	    
	    
	    static int[] sieve(int n)
		{
			int prime[] = new int[n+1];
			for(int i=0;i<=n;i++)
				prime[i] = 1;
			prime[0]=0;
			prime[1]=0;
			for(int p = 2; p*p <=n; p++)
			{
				// If prime[p] is not changed, then it is a prime
				if(prime[p] == 1)
				{
					// Update all multiples of p
					for(int i = p*2; i <= n; i += p)
						prime[i] = 0;
				}
			
			}
			return prime;
		}
		static boolean isPal(String s)
		{
			for(int i=0, j=s.length()-1;i<=j;i++,j--)
			{
				if(s.charAt(i)!=s.charAt(j)) return false;
			}
			return true;
		}
		public static String rev(String s)
		{
			StringBuilder sb=new StringBuilder(s);
			sb.reverse();
			return sb.toString();
		}
		    
		static long lcm(long a, long b)
		{
		    return a * (b / gcd(a, b));
		}
		
		static long gcd(long a, long b)
		{
		    while (b > 0)
		    {
		        long temp = b;
		        b = a % b; // % is remainder
		        a = temp;
		    }
		    return a;
		}
		static long modulo(long a,long b,long c) {
			long x=1;
			long y=a;
			while(b > 0){
				if(b%2 == 1){
					x=(x*y)%c;
				}
				y = (y*y)%c; // squaring the base
				b /= 2;
			}
			return  x%c;
		}
		public static void debug(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
		static class Nd
		{
			Pair p;
			int dist;
			public Nd(Pair q, int d) 
			{
				p=q;
				dist=d;
			}
			
		}
		static class Pair implements Comparable<Pair>{
			int x;
			int y;
			int i;
			Pair(int xx,int yy){
				x=xx;
				y=yy;
			}
			public Pair() {
				// TODO Auto-generated constructor stub
			}
			@Override
			public int compareTo(Pair o) {
				return Integer.compare(this.y, o.y);
			}
		}
	
		static class InputReader {
			public BufferedReader reader;
			public StringTokenizer tokenizer;
	
			public InputReader(InputStream inputstream) {
				reader = new BufferedReader(new InputStreamReader(inputstream));
				tokenizer = null;
			}
	
			public String nextLine(){
				String fullLine=null;
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						fullLine=reader.readLine();
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
					return fullLine;
				}
				return fullLine;
			}
			public String next() {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						tokenizer = new StringTokenizer(reader.readLine());
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
				}
				return tokenizer.nextToken();
			}
			public long nextLong() {
				return Long.parseLong(next());
			}
			public int nextInt() {
				return Integer.parseInt(next());
			}
		}
		
	}

	
	class Node {
		
		int value;
		Node left;
		Node right;
		boolean visited;

	}

	class Nodek
	{
		int key;
		int height;
		Nodek left;
		Nodek right;
		
		public Nodek(int key)
		{
			this.key=key;
			height=1;
		}
	}
	
	class AVL
	{
		Nodek root;
		
		int height(Nodek n)
		{
			if(n==null)
				return 0;
			return (n.height);
		}
		
		Nodek rightrotate(Nodek n)
		{
			Nodek x = n.left;
			Nodek T1 = x.right;
			
			x.right=n;
			n.left=T1;
			
			n.height = Math.max(height(n.left),height(n.right))+1;
			x.height = Math.max(height(x.left),height(x.right))+1;
			return x;
		}
		
		Nodek lefttrotate(Nodek n)
		{
			Nodek x = n.right;
			Nodek T1 = x.left;
			
			x.left=n;
			n.right=T1;
			
			n.height = Math.max(height(n.left),height(n.right))+1;
			x.height = Math.max(height(x.left),height(x.right))+1;
			return x;
		}
		
		int getfactor(Nodek n)
		{
			if(n==null)
				return 0;
			return (height(n.left)-height(n.right));
		}
		
		
		Nodek insert(Nodek node,int key)
		{
			if(node==null)
				return new Nodek(key);
			if(key<node.key)
				node.left = insert(node.left,key);
			else
				node.right = insert(node.right,key);
			
			node.height = Math.max(height(node.left),height(node.right))+1;
			int f = getfactor(node);
			if(f>1 && key<node.left.key)
				return rightrotate(node);
			if(f<-1 && key>node.right.key)
				return lefttrotate(node);
			if(f>1 && key>node.left.key)
			{
				node.left = lefttrotate(node.left);
				return rightrotate(node);
			}
			if(f<-1 && key<node.right.key)
			{
				node.right = rightrotate(node.right);
				return lefttrotate(node);
			}
			return node;
		}
		
		void preOrder(Nodek node) {
	        if (node != null) {
	            System.out.print(node.key + " ");
	            preOrder(node.left);
	            preOrder(node.right);
	        }
	    }
	}
	
	 
	class Graph
	{
	    class Edge implements Comparable<Edge>
	    {
	        int src, dest, weight;
	 
	     
	        public int compareTo(Edge compareEdge)
	        {
	            return this.weight-compareEdge.weight;
	        }
	    };
	
	    class subset
	    {
	        int parent, rank;
	    };
	 
	    int V, E;    
	    Edge edge[];
	    Graph(int v, int e)
	    {
	        V = v;
	        E = e;
	        edge = new Edge[E];
	        for (int i=0; i<e; ++i)
	            edge[i] = new Edge();
	    }
	    int find(subset subsets[], int i)
	    {
	        if (subsets[i].parent != i)
	            subsets[i].parent = find(subsets, subsets[i].parent);
	 
	        return subsets[i].parent;
	    }
	    void Union(subset subsets[], int x, int y)
	    {
	        int xroot = find(subsets, x);
	        int yroot = find(subsets, y);
	        if (subsets[xroot].rank < subsets[yroot].rank)
	            subsets[xroot].parent = yroot;
	        else if (subsets[xroot].rank > subsets[yroot].rank)
	            subsets[yroot].parent = xroot;
	        else
	        {
	            subsets[yroot].parent = xroot;
	            subsets[xroot].rank++;
	        }
	    }
	    long KruskalMST()
	    {
	        Edge result[] = new Edge[V]; 
	        int e = 0;
	        int i = 0;  
	        for (i=0; i<V; ++i)
	            result[i] = new Edge();
	 
	        Arrays.sort(edge);
	 
	        subset subsets[] = new subset[V];
	        for(i=0; i<V; ++i)
	            subsets[i]=new subset();
	 
	        for (int v = 0; v < V; ++v)
	        {
	            subsets[v].parent = v;
	            subsets[v].rank = 0;
	        }
	 
	        i = 0;
	        while (e < V - 1)
	        {
	            Edge next_edge = new Edge();
	            next_edge = edge[i++];
	 
	            int x = find(subsets, next_edge.src);
	            int y = find(subsets, next_edge.dest);
	            if (x != y)
	            {
	                result[e++] = next_edge;
	                Union(subsets, x, y);
	            }
	        }
	        long ans=0;
	        for (i = 0; i < e; ++i)
	        	  ans+=result[i].weight;
	        return ans;
	    }
	}
	