import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] ab = scanner.nextLine().split(" ", 2);

        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        String s = scanner.nextLine();

        if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] ab = scanner.nextLine().split(" ", 2);

        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        String s = scanner.nextLine();

        if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] ab = scanner.nextLine().split(" ", 2);

        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        String s = scanner.nextLine();

        if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } main {
        Scanner scanner = new Scanner(System.in);
        String[] ab = scanner.nextLine().split(" ", 2);

        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        String s = scanner.nextLine();

        if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] ab = scanner.nextLine().split(" ", 2); ab scanner.nextLine().split(" ", 2) scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " 2 int a = Integer.parseInt(ab[0]); a Integer.parseInt(ab[0]) Integer.parseInt Integer ab[0] ab 0 int b = Integer.parseInt(ab[1]); b Integer.parseInt(ab[1]) Integer.parseInt Integer ab[1] ab 1 String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        } a + b + 1 != s.length() a + b + 1 a + b + 1 a b 1 s.length() s.length s {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        } int i = 0; int i = 0; i 0 i <= a + b i a + b a b i++ i++ i {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        } {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        } char ch = s.charAt(i); ch s.charAt(i) s.charAt s i if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            } i == a i a {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } if (ch != '-') {
                    System.out.println("No");
                    return;
                } ch != '-' ch '-' {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            } if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                } !('0' <= ch && ch <= '9') ('0' <= ch && ch <= '9') '0' <= ch '0' ch ch <= '9' ch '9' {
                    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
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] ab = scanner.nextLine().split(" ", 2);

        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        String s = scanner.nextLine();

        if (a + b + 1 != s.length()) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i <= a + b; i++) {
            char ch = s.charAt(i);
            if (i == a) {
                if (ch != '-') {
                    System.out.println("No");
                    return;
                }
            } else {
                if (!('0' <= ch && ch <= '9')) {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
}
