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.*;
public class Solutions {
	static int MAX=Integer.MAX_VALUE;
	static int MIN=Integer.MIN_VALUE;
	static Scanner scr=new Scanner(System.in);
	public static void main(String[] args) {
//		int t=read();
//		while(t-->0) {
			solve();
//		}
	}
	static void solve() {
		int n=read();
		String str=readS();
		char c[]=charArray(str);
		int sum=0;
		for(int i=0;i<n;i++) {
			sum+=c[i]-'0';
		}
		if(sum==0) {
			println("YES");
			return;
		}
		for(int i=0;i<sum;i++) {
			int s=0;
			boolean ok=true;
			for(int j=0;j<n;j++) {
				s+=c[j]-'0';
				if(s>i) {
					ok=false;
					break;
				}else if(s==i){
					s=0;
				}
			}
			if(s>0 && s!=i) {
				ok=false;
			}
			if(ok) {
				println("YES");
				return;
			}
		}
		println("NO");
	}
	
	static boolean cnt(int count[],int ele) {
		return count[ele]==0;
	}
	static ArrayList<Integer>N(){
		return new ArrayList<Integer>();
	}
	static int maxInArray(int a[]) {
		int max=-1;int n=len(a);
		for(int i=0;i<n;i++) {
			max=Math.max(max,a[i]);
		}
		return max;
	}
	static int minInArray(int a[]) {
		int min=MAX;int n=len(a);
		for(int i=0;i<n;i++) {
			min=Math.min(min,a[i]);
		}
		return min;
	}
	static int sumOfArray(int a[]) {
		int sum=0;
		for(int i=0;i<len(a);i++) {
			sum+=a[i];
		}
		return sum;
	}
	static char[] charArray(String s) { 
		return s.toCharArray();
	}
	static int[] sort(int a[]) {
		Arrays.sort(a);
		return a;
	}
	static ArrayList<Integer>sort(ArrayList<Integer>a){
		Collections.sort(a);
		return a;
	}
	static String reverse(String s) {
		String res="";
		for(int i=s.length()-1;i>=0;i--) {
			res+=s.charAt(i);
		}
		return res;
	}static ArrayList<Integer>reverse (ArrayList<Integer>a) {
		ArrayList<Integer>b=new ArrayList<Integer>();
		for(int i=a.size()-1;i>=0;i--) {
			b.add(a.get(i));
		}
		return b;
	}
	static int[] reverse(int a[]) {
		int b[]=new int[a.length];;
		int index=0;
		for(int i=a.length-1;i>=0;i--) {
			b[index]=a[i];
			index++;
		}
		return b;
	}
	static int gcd(int a,int b) {
		if(b==0) {
			return a;
		}
		return gcd(b,a%b);
	}
	static long gcd(long a,long b) {
		if(b==0) {
			return a;
		}
		return gcd(b,a%b);
	}
	static void swap(int a[],int i,int j) {
		int temp=a[i];
		a[i]=a[j];
		a[j]=temp;
	}
	static char[] cha(String s) {
		return s.	toCharArray();
	}
	static int len(String s) {
		return s.length();
	}
	static int len(int a[]) {
		return a.length;
	}
	static int len(long a[]) {
		return a.length;
	}
	static int len(ArrayList<Integer>a) {
		return a.size();
	}
	static long abs(long a) {
		return Math.abs(a);
	}static int abs(int a) {
		return Math.abs(a);
	}
	static long min(long a,long b) {
		return Math.min(a, b);
	}static long max(long a,long b) {
		return Math.max(a, b);
	}
	static void print(int a) {
		System.out.print(a+" ");
	}static void print(long a) {
		System.out.print(a+" ");
	}static void print(String a) {
		System.out.print(a);
	}static void println(int a) {
		System.out.println(a);
	}static void println(long a) {
		System.out.println(a);
	}static void println(String a) {
		System.out.println(a);
	}
	static void println() {
		System.out.println();
	}
	static void println(char []c) {
		for(int i=0;i<c.length;i++) {
			System.out.print(c[i]);
		}
		println();
	}
	static int read() {
		return scr.nextInt();
	}
	static String readS() {
		return scr.next();
	}
	static long readL() {
		return scr.nextLong();
	}
	static int[]readIntArray(int n){
//		int n=read();
		int []a=new int[n];
		for(int i=0;i<n;i++) {
			a[i]=scr.nextInt();
		}
		return a;
	}static long[]readLongArray(int n){
		long []a=new long[n];
		for(int i=0;i<n;i++) {
			a[i]=scr.nextLong();
		}
		return a;
	}
	static void printArray(int a[]) {
		int n=a.length;
		for(int i=0;i<n;i++) {
			print(a[i]);
		}
	}
	static void printList(ArrayList<Integer>a) {
		for(Integer i:a) {
			print(i);
		}
	}
}
//class pair{
//	int first;
//	int second;
//	pair(int first,int second){
//		this.first=first;
//		this.second=second;
//	}
//}
