import java.util.*;

class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		String s_1 = s.substring(0, a);
		String s_2 = s.substring(a + 1);
		
		boolean b_1 = false;
		boolean b_2 = false;
		
		for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		String ans = s_1 + '-' + s_2;
		
        //System.out.println(s_1);
        //System.out.println(b_1);
        //System.out.println(s_2);
        //System.out.println(b_2);
        //System.out.println(s==ans);
      
		if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No");
	    
	}
} import java.util.*; util.* java class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		String s_1 = s.substring(0, a);
		String s_2 = s.substring(a + 1);
		
		boolean b_1 = false;
		boolean b_2 = false;
		
		for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		String ans = s_1 + '-' + s_2;
		
        //System.out.println(s_1);
        //System.out.println(b_1);
        //System.out.println(s_2);
        //System.out.println(b_2);
        //System.out.println(s==ans);
      
		if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No");
	    
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		String s_1 = s.substring(0, a);
		String s_2 = s.substring(a + 1);
		
		boolean b_1 = false;
		boolean b_2 = false;
		
		for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		String ans = s_1 + '-' + s_2;
		
        //System.out.println(s_1);
        //System.out.println(b_1);
        //System.out.println(s_2);
        //System.out.println(b_2);
        //System.out.println(s==ans);
      
		if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No");
	    
	} main {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		String s_1 = s.substring(0, a);
		String s_2 = s.substring(a + 1);
		
		boolean b_1 = false;
		boolean b_2 = false;
		
		for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		String ans = s_1 + '-' + s_2;
		
        //System.out.println(s_1);
        //System.out.println(b_1);
        //System.out.println(s_2);
        //System.out.println(b_2);
        //System.out.println(s==ans);
      
		if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No");
	    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc String s_1 = s.substring(0, a); s_1 s.substring(0, a) s.substring s 0 a String s_2 = s.substring(a + 1); s_2 s.substring(a + 1) s.substring s a + 1 a 1 boolean b_1 = false; b_1 false boolean b_2 = false; b_2 false for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} int i = 0; int i = 0; i 0 i < s_1.length() i s_1.length() s_1.length s_1 ++i ++i i {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    } Character.isDigit(s_1.charAt(i)) Character.isDigit Character s_1.charAt(i) s_1.charAt s_1 i b_1 = true b_1 true {
		        b_1 = false;
		        break;
		    } b_1 = false b_1 false break; for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} int i = 0; int i = 0; i 0 i < s_2.length() i s_2.length() s_2.length s_2 ++i ++i i {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		} if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    } Character.isDigit(s_2.charAt(i)) Character.isDigit Character s_2.charAt(i) s_2.charAt s_2 i b_2 = true b_2 true {
		        b_1 = false;
		        break;
		    } b_1 = false b_1 false break; String ans = s_1 + '-' + s_2; ans s_1 + '-' + s_2 s_1 + '-' + s_2 s_1 '-' s_2 if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No"); s.equals(ans) && b_1 && b_2 s.equals(ans) && b_1 && b_2 s.equals(ans) s.equals s ans b_1 b_2 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" String[] args args
import java.util.*;

class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		String s_1 = s.substring(0, a);
		String s_2 = s.substring(a + 1);
		
		boolean b_1 = false;
		boolean b_2 = false;
		
		for(int i = 0; i < s_1.length(); ++i) {
		    if(Character.isDigit(s_1.charAt(i))) b_1 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		for(int i = 0; i < s_2.length(); ++i) {
		    if(Character.isDigit(s_2.charAt(i))) b_2 = true;
		    else {
		        b_1 = false;
		        break;
		    }
		}
		
		String ans = s_1 + '-' + s_2;
		
        //System.out.println(s_1);
        //System.out.println(b_1);
        //System.out.println(s_2);
        //System.out.println(b_2);
        //System.out.println(s==ans);
      
		if(s.equals(ans) && b_1 && b_2) System.out.println("Yes");
		else System.out.println("No");
	    
	}
}