Recently Vasya found a golden ticket — a sequence which consists of n digits a_1a_2... a_n. Vasya considers a ticket to be lucky if it can be divided into two or more non-intersecting segments with equal sums. For example, ticket 350178 is lucky since it can be divided into three segments 350, 17 and 8: 3+5+0=1+7=8. Note that each digit of sequence should belong to exactly one segment.

Help Vasya! Tell him if the golden ticket he found is lucky or not.

Input

The first line contains one integer n (2 ≤ n ≤ 100) — the number of digits in the ticket.

The second line contains n digits a_1 a_2 ... a_n (0 ≤ a_i ≤ 9) — the golden ticket. Digits are printed without spaces.

Output

If the golden ticket is lucky then print "YES", otherwise print "NO" (both case insensitive).

Examples

Input

5
73452


Output

YES


Input

4
1248


Output

NO

Note

In the first example the ticket can be divided into 7, 34 and 52: 7=3+4=5+2.

In the second example it is impossible to divide ticket into segments with equal sum.
import java.util.*;
import java.io.*;

public class Main {

	static long gcd(long a,long b) {
		//System.out.println("a "+a+" b "+b);
		if(b==0) {
			return a;
		}
		return gcd(b,a%b);
	}
	
	static void debug(Object... O) {
		System.out.println(Arrays.deepToString(O));
	}
	
	static 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(); 
        } 
    } 
	
	static class Pair implements Comparable<Pair>{
		int x,y;
		
		public Pair(int t,int i) {
			x = t;
			y = i;
		}
		
		public int compareTo(Pair p) {
			if(this.x != p.x) {
				return p.x-this.x;
			}
			return p.y-this.y;
		}
	}
	static int[] P = new int[106];
	static int[] A= new int[106];
	static boolean solve(int e,int n,int sum) {		
		for(int i=e+1;i<n;i++) {			
			int t = P[i]-P[e];
			//System.out.println("e "+e+" i "+i+" t "+t+" sum "+sum);
			if(t == sum) {
				if(i==n-1) {
					return true;
				}
				boolean f = solve(i,n,sum);
				if(f)
					return f;
			}else if (t > sum) {
				boolean f = solve(e+1,n,sum+A[e+1]);
				if(f){
					return f;					
				}
				if(e+1 == n) {
					return false;
				}
			}
		}
		return false;
	}
	
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		//Reader sc = new Reader();
		int n = sc.nextInt();
		sc.nextLine();
		String s = sc.nextLine();
		StringBuilder sb = new StringBuilder(s);		
		while(sb.length() > 0 && sb.charAt(0)=='0') {
			sb.deleteCharAt(0);
		}
		while(sb.length()>0 && sb.charAt(sb.length()-1)=='0') {
			sb.deleteCharAt(sb.length()-1);
		}
		char[] S = sb.toString().toCharArray();
		int sum = 0;
		boolean z = false;
		n = S.length;
		for(int i=0;i<n;i++) {
			A[i] = S[i]-'0';
			if(A[i] != 0) {
				z = true;
			}
			sum += A[i];
		}
		if(z == false) {
			System.out.println("YES");
			return;
		}
		for(int i=1;i<sum;i++) {
			if(sum % i == 0) {
				boolean flag = true;				
				int ind = 0;				
				while(ind != n) {
					int tsum = 0;
					flag = true;
					while(ind < n && tsum != i) {
						tsum += A[ind];
						if(tsum > i) {
							flag = false;
							break;
						}
						ind++;
					}					
					if(flag==false || tsum!=i) {
						//System.out.println("flag "+flag+" tsum "+tsum+" i "+i+" ind "+ind);
						flag = false;
						break;
					}
					//System.out.println("ind "+ind+" flag "+flag+" sum "+i);
				}
				//System.out.println("flag "+flag);
				if(flag) {
					//System.out.println("sum "+i);
					System.out.println("YES");
					return;
				}
			}
		}
		System.out.println("NO");
	}

}
