import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

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

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();

        int judge = 1;
        for (int i = 0; i < s.length(); i++) {
            if (i != a) {
                if (0 <= Character.getNumericValue(s.charAt(i)) && 9 >= Character.getNumericValue(s.charAt(i))) {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            } else {
                if (s.charAt(i) == '-') {
                    continue;
                } else {
                    judge = 0;
                    break;
                }
            }
        }

        if (judge == 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
