import java.util.*;
import java.io.*;

public class Main{
	public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} 

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
	public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} 

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	}
} Main public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} isInteger { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	} catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	} Exception e { 
        	return false; //If it doesn't work return false
    	} return false; //If it doesn't work return false false { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	} Integer.parseInt( input ) Integer.parseInt Integer input return true; //Return true if it works true String input input public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		} s.length() == (a + b + 1) s.length() s.length s (a + b + 1) a + b + 1 a b 1 { 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		} if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			} s.charAt(a) == '-' s.charAt(a) s.charAt s a '-' {
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			} String s1 = s.substring(0, a); s1 s.substring(0, a) s.substring s 0 a String s2 = s.substring(a+1); s2 s.substring(a+1) s.substring s a+1 a 1 if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No"); isInteger(s1) && isInteger(s2) isInteger(s1) isInteger s1 isInteger(s2) isInteger s2 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" {
				System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
	public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} 

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	}
} public class Main{
	public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} 

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	}
} Main
import java.util.*;
import java.io.*;

public class Main{
	public static boolean isInteger( String input ) { //Pass in string
    	try { //Try to make the input into an integer
        	Integer.parseInt( input );
        	return true; //Return true if it works
    	}
    	catch( Exception e ) { 
        	return false; //If it doesn't work return false
    	}
	} 

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		
		if(s.length() == (a + b + 1)){ 
			if(s.charAt(a) == '-'){
				String s1 = s.substring(0, a);
				String s2 = s.substring(a+1);
				if(isInteger(s1) && isInteger(s2))
					System.out.println("Yes");
				else
					System.out.println("No");
			}else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
		}
	}
}
