import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int first = Integer.parseInt(sc.next()); first Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int second = Integer.parseInt(sc.next()); second Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String postCd = sc.next(); postCd sc.next() sc.next sc for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } int x=1; int x=1; x 1 x<=first x first x++ x++ x {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            } catch(Exception e){
                System.out.println("No");
                return;
            } Exception e {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; {
                Integer.parseInt(postCd.substring(x-1,x));
            } Integer.parseInt(postCd.substring(x-1,x)) Integer.parseInt Integer postCd.substring(x-1,x) postCd.substring postCd x-1 x 1 x if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        } !postCd.substring(first,first+1).equals("-") postCd.substring(first,first+1).equals("-") postCd.substring(first,first+1).equals postCd.substring(first,first+1) postCd.substring postCd first first+1 first 1 "-" {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } int x=first+2; int x=first+2; x first+2 first 2 x<=first+second+1 x first+second+1 first+second+1 first second 1 x++ x++ x {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        } try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            } catch(Exception e){
                System.out.println("No");
                return;
            } Exception e {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; {
                Integer.parseInt(postCd.substring(x-1,x));
            } Integer.parseInt(postCd.substring(x-1,x)) Integer.parseInt Integer postCd.substring(x-1,x) postCd.substring postCd x-1 x 1 x System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int first = Integer.parseInt(sc.next());
        int second = Integer.parseInt(sc.next());
        String postCd = sc.next();
        for(int x=1; x<=first;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        if(!postCd.substring(first,first+1).equals("-")) {
            System.out.println("No");
            return;
        }
        for(int x=first+2; x<=first+second+1;x++) {
            try {
                Integer.parseInt(postCd.substring(x-1,x));
            } catch(Exception e){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
}
