import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String[] ss = sc.next().split("-"); ss sc.next().split("-") sc.next().split sc.next() sc.next sc "-" if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        } ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+") ss[1].length() == B ss[0].matches("[0-9]+") ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+") ss.length == 2 ss.length ss ss.length 2 ss[0].length() == A ss[0].length() ss[0].length ss[0] ss 0 A ss[0].matches("[0-9]+") ss[0].matches ss[0] ss 0 "[0-9]+" ss[1].length() == B ss[1].length() ss[1].length ss[1] ss 1 B ss[1].matches("[0-9]+") ss[1].matches ss[1] ss 1 "[0-9]+" {
            out.println("Yes");
        } out.println("Yes") out.println out "Yes" {
            out.println("No");
        } out.println("No") out.println out "No" out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        String[] ss = sc.next().split("-");
        
        if (ss.length == 2
                && ss[0].length() == A
                && ss[0].matches("[0-9]+")
                && ss[1].length() == B
                && ss[1].matches("[0-9]+")) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        
        out.flush();
    }
}