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.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        FastReader in = new FastReader(System.in);
        FastPrinter out = new FastPrinter(System.out);
        //FastReader in = new FastReader(new FileInputStream(new File("input.txt")));
        //FastPrinter out = new FastPrinter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        String s = in.next();
        int[] mas = new int[n];
        int n1 = n;
        for(int i = 0; i < n; i++){
            mas[i] = Integer.parseInt(Character.toString(s.charAt(i)));
            if(mas[i] == 0) n1--;
        }

        int[] mas2 = new int[n1];
        int k1 = 0;
        for(int i = 0; i < n; i++){
            if (mas[i] != 0) mas2[k1] = mas[i];
            if(mas[i] != 0) k1++;
        }
        n = n1;
        if(n == 0){
            System.out.println("YES");
        }
        else if(n == 1){
            System.out.println("NO");
        }
        else {
            int k = 0;
            boolean flag4 = false;
            boolean flag;
            for (int i = 0; i < n; i++) {
                flag = true;
                k += mas2[i];
                int k2 = 0;
                for (int j = i + 1; j < n; j++) {

                    k2 += mas2[j];
                    if (k2 == k) {
                        k2 = 0;
                        if (j == n - 1) {
                            flag = false;
                            break;
                        }
                    }
                    if (k2 > k) {
                        flag = true;
                        break;
                    }
                }
                if (flag == false) {
                    flag4 = true;
                    break;
                }
            }
            if (flag4 == true) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
        out.close();
    }
}

class FastPrinter {
    private final PrintWriter writer;

    public FastPrinter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public FastPrinter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void close() {
        writer.close();
    }

    public void println(long i) {
        writer.println(i);
    }

    public void println(double d) {
        writer.println(d);
    }

    public void println(String s) {
        writer.println(s);
    }

    public void println(String format, Object... args) {
        println(String.format(format, args));
    }

    public void println() {
        writer.println();
    }

    public void print(long i) {
        writer.print(i);
    }

    public void print(char c) {
        writer.print(c);
    }

    public void print(double d) {
        writer.print(d);
    }

    public void print(String s) {
        writer.print(s);
    }

    public void print(String format, Object... args) {
        print(String.format(format, args));
    }

    public void flush() {
        writer.flush();
    }
}

class FastReader {
    InputStream is;
    private byte[] inbuf = new byte[1024];
    private int lenbuf = 0, ptrbuf = 0, charArrayLength = (int) 1e3;

    public FastReader(InputStream is) {
        this.is = is;
    }

    public FastReader(InputStream is, int charArrayLength) {
        this.is = is;
        this.charArrayLength = charArrayLength;
    }

    public int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    public boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    public int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    public String next() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public String nextLine() {
        int b = readByte();
        StringBuilder sb = new StringBuilder();
        while (b != '\n' || b != '\r') {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public int nextInt() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') {
                num = (num << 3) + (num << 1) + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    public long nextLong() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = (num << 3) + (num << 1) + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

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

    public char[] next(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    public char nextChar() {
        return (char) skip();
    }

    private char buff[];

    public char[] nextCharArray() {
        if (buff == null) buff = new char[charArrayLength];
        int b = skip(), p = 0;
        while (!(isSpaceChar(b))) {
            buff[p++] = (char) b;
            b = readByte();
        }
        return Arrays.copyOf(buff, p);
    }
}