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();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} 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();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    } 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[] postcode = sc.next().toCharArray(); postcode sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        } int i = 0; int i = 0; i 0 i < postcode.length i postcode.length postcode postcode.length i++ i++ i {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        } {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        } if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            } i == a && !String.valueOf(postcode[i]).equals("-") i == a i a !String.valueOf(postcode[i]).equals("-") String.valueOf(postcode[i]).equals("-") String.valueOf(postcode[i]).equals String.valueOf(postcode[i]) String.valueOf String postcode[i] postcode i "-" {
                System.out.println("No");
                System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            } i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9 i != a && 0 > Character.getNumericValue(postcode[i]) i != a i a 0 > Character.getNumericValue(postcode[i]) 0 Character.getNumericValue(postcode[i]) Character.getNumericValue Character postcode[i] postcode i Character.getNumericValue(postcode[i]) > 9 Character.getNumericValue(postcode[i]) Character.getNumericValue Character postcode[i] postcode i 9 {
                System.out.println("No");
                System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} 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();
        char[] postcode = sc.next().toCharArray();
        for (int i = 0; i < postcode.length; i++) {
            if(i == a && !String.valueOf(postcode[i]).equals("-")) {
                System.out.println("No");
                System.exit(0);
            }
            if(i != a && 0 > Character.getNumericValue(postcode[i]) || Character.getNumericValue(postcode[i]) > 9) {
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
}