import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    }

    private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    }

    private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {

    public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    }

    private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    }

    private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    }
} Main public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    } main {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    } MyReader reader = new MyReader(); reader new MyReader() int[] ab = reader.readInts(" "); ab reader.readInts(" ") reader.readInts reader " " int a = ab[0]; a ab[0] ab 0 int b = ab[1]; b ab[1] ab 1 String s = reader.readString(); s reader.readString() reader.readString reader System.out.println(problem084b(a, b, s)) System.out.println System.out System System.out problem084b(a, b, s) problem084b a b s String[] args args private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    } problem084b {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    } 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 "}" Pattern pattern = Pattern.compile(regex); pattern Pattern.compile(regex) Pattern.compile Pattern regex Matcher matcher = pattern.matcher(s); matcher pattern.matcher(s) pattern.matcher pattern s return (matcher.matches()) ? "Yes" : "No"; (matcher.matches()) ? "Yes" : "No" (matcher.matches()) matcher.matches matcher "Yes" "No" int a a int b b String s s private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    } MyReader private final BufferedReader br; br private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } MyReader {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) private String readString() throws IOException {
            return br.readLine();
        } readString {
            return br.readLine();
        } return br.readLine(); br.readLine() br.readLine br private int readInt() throws IOException {
            return Integer.parseInt(readString());
        } readInt {
            return Integer.parseInt(readString());
        } return Integer.parseInt(readString()); Integer.parseInt(readString()) Integer.parseInt Integer readString() readString private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        } readStrings {
            return readString().split(regex);
        } return readString().split(regex); readString().split(regex) readString().split readString() readString regex String regex regex private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        } readInts {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        } String[] strings = readStrings(regex); strings readStrings(regex) readStrings regex int[] ints = new int[strings.length]; ints new int[strings.length] strings.length strings strings.length for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            } int i = 0; int i = 0; i 0 i < ints.length i ints.length ints ints.length i++ i++ i {
                ints[i] = Integer.parseInt(strings[i]);
            } {
                ints[i] = Integer.parseInt(strings[i]);
            } ints[i] = Integer.parseInt(strings[i]) ints[i] ints i Integer.parseInt(strings[i]) Integer.parseInt Integer strings[i] strings i return ints; ints String regex regex public class Main {

    public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    }

    private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    }

    private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    }
} public class Main {

    public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    }

    private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    }

    private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) throws IOException {
        MyReader reader = new MyReader();
        int[] ab = reader.readInts(" ");
        int a = ab[0];
        int b = ab[1];
        String s = reader.readString();
        System.out.println(problem084b(a, b, s));
    }

    private static String problem084b(int a, int b, String s) {
        String regex = "[0-9]{" + a + "}-[0-9]{" + b + "}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        return (matcher.matches()) ? "Yes" : "No";
    }

    private static class MyReader {
        private final BufferedReader br;
        private MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String readString() throws IOException {
            return br.readLine();
        }

        private int readInt() throws IOException {
            return Integer.parseInt(readString());
        }

        private String[] readStrings(String regex) throws IOException {
            return readString().split(regex);
        }

        private int[] readInts(String regex) throws IOException {
            String[] strings = readStrings(regex);
            int[] ints = new int[strings.length];
            for (int i = 0; i < ints.length; i++) {
                ints[i] = Integer.parseInt(strings[i]);
            }
            return ints;
        }
    }
}