import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Scanner;

class Main {
    static final int MOD = 1000000007;
    static final int INF = 1 << 30;
    static final int ALF = 26;

    Main() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] c = sc.next().toCharArray();
        boolean ok = c.length == a + b + 1;
        for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        }
        System.out.println(ok?"Yes":"No");
    }

    public static void main(String[] args) {
        new Main();
    }
} import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.PriorityQueue; PriorityQueue java.util import java.util.Scanner; Scanner java.util class Main {
    static final int MOD = 1000000007;
    static final int INF = 1 << 30;
    static final int ALF = 26;

    Main() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] c = sc.next().toCharArray();
        boolean ok = c.length == a + b + 1;
        for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        }
        System.out.println(ok?"Yes":"No");
    }

    public static void main(String[] args) {
        new Main();
    }
} Main static final int MOD = 1000000007; MOD 1000000007 static final int INF = 1 << 30; INF 1 << 30 1 30 static final int ALF = 26; ALF 26 Main() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] c = sc.next().toCharArray();
        boolean ok = c.length == a + b + 1;
        for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        }
        System.out.println(ok?"Yes":"No");
    } Main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] c = sc.next().toCharArray();
        boolean ok = c.length == a + b + 1;
        for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        }
        System.out.println(ok?"Yes":"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 char[] c = sc.next().toCharArray(); c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean ok = c.length == a + b + 1; ok c.length == a + b + 1 c.length c c.length a + b + 1 a + b + 1 a b 1 for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        } int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        } {
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        } if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            } i==a i a {
                if(c[i]!='-'){
                    ok=false;
                }
            } if(c[i]!='-'){
                    ok=false;
                } c[i]!='-' c[i] c i '-' {
                    ok=false;
                } ok=false ok false {
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            } if(!Character.isDigit(c[i])){
                    ok=false;
                } !Character.isDigit(c[i]) Character.isDigit(c[i]) Character.isDigit Character c[i] c i {
                    ok=false;
                } ok=false ok false System.out.println(ok?"Yes":"No") System.out.println System.out System System.out ok?"Yes":"No" ok "Yes" "No" public static void main(String[] args) {
        new Main();
    } main {
        new Main();
    } new Main() String[] args args
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Scanner;

class Main {
    static final int MOD = 1000000007;
    static final int INF = 1 << 30;
    static final int ALF = 26;

    Main() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] c = sc.next().toCharArray();
        boolean ok = c.length == a + b + 1;
        for(int i=0;i<c.length;i++){
            if(i==a){
                if(c[i]!='-'){
                    ok=false;
                }
            }else{
                if(!Character.isDigit(c[i])){
                    ok=false;
                }
            }
        }
        System.out.println(ok?"Yes":"No");
    }

    public static void main(String[] args) {
        new Main();
    }
}
