import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    }
} import java.util.*; util.* java import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    } main {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "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 String S = sc.next(); S sc.next() sc.next sc Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$"); p Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$") Pattern.compile Pattern "^[0-9]{" + A + "}-[0-9]{" + B + "}$" B "}-[0-9]{" "^[0-9]{" + A + "}-[0-9]{" + B + "}$" "^[0-9]{" A "}-[0-9]{" B "}$" Matcher m = p.matcher(S); m p.matcher(S) p.matcher p S System.out.println( (m.find()) ? "Yes" : "No" ) System.out.println System.out System System.out (m.find()) ? "Yes" : "No" (m.find()) m.find m "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    }
} Main
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}$");
        Matcher m = p.matcher(S);
        
        System.out.println( (m.find()) ? "Yes" : "No" );
    }
}
