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.*;
import java.math.*;
public class loser
{
    static class InputReader {
        public BufferedReader br;
        public StringTokenizer token;
        public InputReader(InputStream stream)
        {
            br=new BufferedReader(new InputStreamReader(stream),32768);
            token=null;
        }

        public String next()
        {
            while(token==null || !token.hasMoreTokens())
            {
                try
                {
                    token=new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    throw new RuntimeException(e);
                }
            }
            return token.nextToken();
        }

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

        public long nextLong()
        {
            return Long.parseLong(next());
        }
    }
    static class card{
        long a;
        int i;
        public card(long a,int i)
        {
            this.a=a;
            this.i=i;
        }
    }
    static class sort implements Comparator<pair>
    {
        public int compare(pair o1,pair o2)
        {
            return (o1.b-o2.b)*-1;
        }
    }
    /*static class sort1 implements Comparator<pair>
    {
    public int compare(pair o1,pair o2)
    {
    if(o1.a!=o2.a)
    return (int)(o1.a-o2.a);
    else
    return (o1.b-o2.b);
    }
    }*/
    static class extra{
        static void shuffle(long a[])
        {
            List<Long> l=new ArrayList<>();
            for(int i=0;i<a.length;i++)
                l.add(a[i]);
            Collections.shuffle(l);
            for(int i=0;i<a.length;i++)
                a[i]=l.get(i);
        }

        static long gcd(long a,long b)
        {
            if(b==0)
                return a;
            else
                return gcd(b,a%b);
        }

        static boolean valid(int i,int j,int r,int c)
        {
            if(i>=0 && i<r && j>=0 && j<c)
                return true;
            else
                return false;
        }
        static boolean v[]=new boolean[100001];
        static List<Integer> l=new ArrayList<>();
        static int t;
        static void seive()
        {
            for(int i=2;i<100001;i++)
            {
                if(!v[i])
                {
                    t++;
                    l.add(i);
                    for(int j=2*i;j<100001;j+=i)
                        v[j]=true;
                }
            }
        }

        static int binary(int a[],int val,int n)
        {
            int mid=0,l=0,r=n-1,ans=0;
            while(l<=r)
            {
                mid=(l+r)>>1;
                if(a[mid]==val)
                {
                    r=mid-1;
                    ans=mid;
                }
                else if(a[mid]>val)
                    r=mid-1;
                else
                {
                    l=mid+1;
                    ans=l;
                }
            }
            return (ans+1);
        }
    }
    static class pair{
        int a;
        int b;
        public pair(int a,int n)
        {
            this.a=a;
            this.b=n;
        }
    }
    static InputReader sc=new InputReader(System.in);
    static PrintWriter out=new PrintWriter(System.out);
    public  static void main(String[] args) 
    {
        solver s=new solver();
        int t=1;
        while(t>0)
        {
            s.solve();
            t--;
        }
    }
    static class solver
    {
        void solve()
        {
            int n=sc.nextInt();
            char c[]=sc.next().toCharArray();
            int pre[]=new int[n];
            for(int i=0;i<n;i++)
            {
                if(i==0)
                pre[i]=c[i]-'0';
                else
                pre[i]=pre[i-1]+(c[i]-'0');
            }
            for(int i=0;i<n;i++)
            {
                int sum=0,count=0;
                for(int j=i+1;j<n;j++)
                {
                    if((c[j]-'0')==0 && sum==pre[i])
                    count=j;
                    else if((c[j]-'0')==0 && sum!=pre[i])
                    continue;
                    else if((c[j]-'0')!=0 && sum==pre[i])
                    {
                        sum=0;
                        sum+=c[j]-'0';
                    }
                    else 
                    sum+=c[j]-'0';
                    if(sum>pre[i])
                    break;
                    if(sum==pre[i])
                    {
                        count=j;
                    }
                }
                if(count==(n-1))
               {
                   System.out.println("yes");
                   System.exit(0);
               }
            }
            System.out.println("no");
        }
    }
}

