import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        char[] S = sc.next().toCharArray();

        for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        if (S[A] != '-') {
            System.out.println("No");
            return;
        }

        for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        char[] S = sc.next().toCharArray();

        for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        if (S[A] != '-') {
            System.out.println("No");
            return;
        }

        for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        char[] S = sc.next().toCharArray();

        for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        if (S[A] != '-') {
            System.out.println("No");
            return;
        }

        for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        return;
    } run {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        char[] S = sc.next().toCharArray();

        for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        if (S[A] != '-') {
            System.out.println("No");
            return;
        }

        for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        return;
    } 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 char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } char ch = S[i]; ch S[i] S i if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            } !(ch >= '0' && ch <= '9') (ch >= '0' && ch <= '9') ch >= '0' ch '0' ch <= '9' ch '9' {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if (S[A] != '-') {
            System.out.println("No");
            return;
        } S[A] != '-' S[A] S A '-' {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } int i = A + 1; int i = A + 1; i A + 1 A 1 i < A + B + 1 i A + B + 1 A + B + 1 A B 1 i++ i++ i {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        } char ch = S[i]; ch S[i] S i if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            } !(ch >= '0' && ch <= '9') (ch >= '0' && ch <= '9') ch >= '0' ch '0' 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" return;
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        char[] S = sc.next().toCharArray();

        for (int i = 0; i < A; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        if (S[A] != '-') {
            System.out.println("No");
            return;
        }

        for (int i = A + 1; i < A + B + 1; i++) {
            char ch = S[i];
            if (!(ch >= '0' && ch <= '9')) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        return;
    }

}