import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskB solver = new TaskB(); solver new TaskB() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    } TaskB public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        } solve {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        } int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in String str = in.next(); str in.next() in.next in String subA = str.substring(0, a); subA str.substring(0, a) str.substring str 0 a String subB = str.substring(a + 1); subB str.substring(a + 1) str.substring str a + 1 a 1 if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            } str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-") str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-") str.charAt(a) == '-' str.charAt(a) str.charAt str a '-' !subA.contains("-") subA.contains("-") subA.contains subA "-" !subB.contains("-") subB.contains("-") subB.contains subB "-" {
                out.print("Yes");
            } out.print("Yes") out.print out "Yes" {
                out.print("No");
            } out.print("No") out.print out "No" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String str = in.next();

            String subA = str.substring(0, a);
            String subB = str.substring(a + 1);

            if (str.charAt(a) == '-' &&
                    !subA.contains("-") &&
                    !subB.contains("-")) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

    }
}

