import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    private static final int MAX = 5000+24;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    }

} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    private static final int MAX = 5000+24;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    }

} Main private static final int MAX = 5000+24; MAX 5000+24 5000 24 public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    } main {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        } in.hasNext() in.hasNext in {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        } int a=in.nextInt() a in.nextInt() in.nextInt in b=in.nextInt(); b in.nextInt() in.nextInt in String code=in.next(); code in.next() in.next in boolean flag=code.length()==a+b+1; flag code.length()==a+b+1 code.length() code.length code a+b+1 a+b+1 a b 1 for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            } int i=0; int i=0; i 0 i<code.length() i code.length() code.length code i++ i++ i {
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            } {
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            } flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i))) flag flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i))) flag (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i))) i == a i a code.charAt(i) == '-' code.charAt(i) code.charAt code i '-' Character.isDigit(code.charAt(i)) Character.isDigit Character code.charAt(i) code.charAt code i out.println(flag?"Yes":"No") out.println out flag?"Yes":"No" flag "Yes" "No" out.flush() out.flush out in.close() in.close in out.close() out.close out String[] args args public class Main {
    private static final int MAX = 5000+24;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    }

} public class Main {
    private static final int MAX = 5000+24;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    }

} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    private static final int MAX = 5000+24;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        while(in.hasNext()) {
            int a=in.nextInt(),b=in.nextInt();
            String code=in.next();
            boolean flag=code.length()==a+b+1;
            for(int i=0;i<code.length();i++){
                flag = flag & (i == a ? code.charAt(i) == '-' : Character.isDigit(code.charAt(i)));
            }
            out.println(flag?"Yes":"No");
            out.flush();
        }
        in.close();
        out.close();
    }

}
