import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}"; regex "[0-9]{" + a + "}-[0-9]{" + b + "}" b "}-[0-9]{" "[0-9]{" + a + "}-[0-9]{" + b + "}" "[0-9]{" a "}-[0-9]{" b "}" boolean judge = s.matches(regex); judge s.matches(regex) s.matches s regex String result = judge ? "Yes" : "No"; result judge ? "Yes" : "No" judge "Yes" "No" System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();

        // 主処理
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        boolean judge = s.matches(regex);
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
}
