import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    } main {
        Main main = new Main();
        main.solve();
    } Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    } solve {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan char[] x = s.toCharArray(); x s.toCharArray() s.toCharArray s boolean answer = true; answer true for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        } {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        } if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            } !(0 <= x[i] - '0' && x[i] - '0' <= 9) (0 <= x[i] - '0' && x[i] - '0' <= 9) 0 <= x[i] - '0' 0 x[i] - '0' x[i] x i '0' x[i] - '0' <= 9 x[i] - '0' x[i] x i '0' 9 {
                answer = false;
                break;
            } answer = false answer false break; if (x[A] != '-') {
            answer = false;
        } x[A] != '-' x[A] x A '-' {
            answer = false;
        } answer = false answer false for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < B i B i++ i++ i {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        } {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        } if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            } !(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9) (0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9) 0 <= x[A+1+i] - '0' 0 x[A+1+i] - '0' x[A+1+i] x A+1+i A+1+i A 1 i '0' x[A+1+i]-'0' <= 9 x[A+1+i]-'0' x[A+1+i] x A+1+i A+1+i A 1 i '0' 9 {
                answer = false;
                break;
            } answer = false answer false break; System.out.println(answer ? "Yes" : "No") System.out.println System.out System System.out answer ? "Yes" : "No" answer "Yes" "No" public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        String s = scan.next();
        char[] x = s.toCharArray();
        boolean answer = true;
        for (int i = 0; i < A; i++) {
            if (!(0 <= x[i] - '0' && x[i] - '0' <= 9)) {
                answer = false;
                break;
            }
        }
        if (x[A] != '-') {
            answer = false;
        }
        for (int i = 0; i < B; i++) {
            if (!(0 <= x[A+1+i] - '0' && x[A+1+i]-'0' <= 9)) {
                answer = false;
                break;
            }
        }
        System.out.println(answer ? "Yes" : "No");
    }
}
