import java.util.Scanner;


public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } 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 if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        } s.length() != a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        } !"-".equals(String.valueOf(s.charAt(a))) "-".equals(String.valueOf(s.charAt(a))) "-".equals "-" String.valueOf(s.charAt(a)) String.valueOf String s.charAt(a) s.charAt s a {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        } {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        } if (i == a) {
                continue;
            } i == a i a {
                continue;
            } continue; int num = Character.getNumericValue(s.charAt(i)); num Character.getNumericValue(s.charAt(i)) Character.getNumericValue Character s.charAt(i) s.charAt s i if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            } !(num >= 0 && num < 10) (num >= 0 && num < 10) num >= 0 num 0 num < 10 num 10 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main
import java.util.Scanner;


public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            return;
        }
        if (!"-".equals(String.valueOf(s.charAt(a)))) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < s.length(); i++) {
            if (i == a) {
                continue;
            }
            int num = Character.getNumericValue(s.charAt(i));
            if (!(num >= 0 && num < 10)) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

}
