import java.util.Scanner;

class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int a = sc.nextInt(), b = sc.nextInt();
        String s = sc.next();

        try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int a = sc.nextInt(), b = sc.nextInt();
        String s = sc.next();

        try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int a = sc.nextInt(), b = sc.nextInt();
        String s = sc.next();

        try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } main {
        int a = sc.nextInt(), b = sc.nextInt();
        String s = sc.next();

        try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        } catch (Exception e) {
            System.out.println("No");
            return;
        } Exception e {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } Integer.parseInt(s.substring(0, a)) Integer.parseInt Integer s.substring(0, a) s.substring s 0 a Integer.parseInt(s.substring(a + 1)) Integer.parseInt Integer s.substring(a + 1) s.substring s a + 1 a 1 if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            } !s.substring(a, a+1).equals("-") || s.length() != a + b + 1 !s.substring(a, a+1).equals("-") s.substring(a, a+1).equals("-") s.substring(a, a+1).equals s.substring(a, a+1) s.substring s a a+1 a 1 "-" s.length() != a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 {
                throw new Exception();
            } throw new Exception(); new Exception() System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.Scanner;

class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int a = sc.nextInt(), b = sc.nextInt();
        String s = sc.next();

        try {
            Integer.parseInt(s.substring(0, a));
            Integer.parseInt(s.substring(a + 1));
            if (!s.substring(a, a+1).equals("-") || s.length() != a + b + 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
}