import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util import java.util.regex.Pattern; Pattern java.util.regex public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc final int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc final String S = sc.next(); S sc.next() sc.next sc Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}"); p Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}") Pattern.compile Pattern "^[0-9]{" + A + "}-[0-9]{" + B + "}" B "}-[0-9]{" "^[0-9]{" + A + "}-[0-9]{" + B + "}" "^[0-9]{" A "}-[0-9]{" B "}" System.out.println(p.matcher(S).matches() ? "Yes" : "No") System.out.println System.out System System.out p.matcher(S).matches() ? "Yes" : "No" p.matcher(S).matches() p.matcher(S).matches p.matcher(S) p.matcher p S "Yes" "No" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    }
} Main
import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final String S = sc.next();

        Pattern p = Pattern.compile("^[0-9]{" + A + "}-[0-9]{" + B + "}");
        System.out.println(p.matcher(S).matches() ? "Yes" : "No");
    }
}
