import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    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 x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    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 x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String postal = sc.next(); postal sc.next() sc.next sc String[] decomp = new String[3]; decomp new String[3] 3 decomp[0] = postal.substring(0, x) decomp[0] decomp 0 postal.substring(0, x) postal.substring postal 0 x decomp[1] = postal.substring(x, x + 1) decomp[1] decomp 1 postal.substring(x, x + 1) postal.substring postal x x + 1 x 1 decomp[2] = postal.substring(x + 1, postal.length() - 1) decomp[2] decomp 2 postal.substring(x + 1, postal.length() - 1) postal.substring postal x + 1 x 1 postal.length() - 1 postal.length() postal.length postal 1 for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        } {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        } char[] array = decomp[i].toCharArray(); array decomp[i].toCharArray() decomp[i].toCharArray decomp[i] decomp i if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            } i == 0 || i == 2 i == 0 i 0 i == 2 i 2 {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                } char c array {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                } {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                } if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } !Character.isDigit(c) Character.isDigit(c) Character.isDigit Character c {
                        System.out.println("No");
                        return;
                    } System.out.println("No") System.out.println System.out System System.out "No" return; {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            } if (array[0] != '-') {
                    System.out.println("No");
                    return;
                } array[0] != '-' array[0] array 0 '-' {
                    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 {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    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 x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    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 x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        String postal = sc.next();
        String[] decomp = new String[3];
        decomp[0] = postal.substring(0, x);
        decomp[1] = postal.substring(x, x + 1);
        decomp[2] = postal.substring(x + 1, postal.length() - 1);
        for (int i = 0; i < 3; i++) {
            char[] array = decomp[i].toCharArray();
            if (i == 0 || i == 2) {
                for (char c : array) {
                    if (!Character.isDigit(c)) {
                        System.out.println("No");
                        return;
                    } 
                }
            } else {
                if (array[0] != '-') {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
}
