import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc boolean flag = true; flag true if (str.length() != a + b + 1) {
            flag = false;
        } str.length() != a + b + 1 str.length() str.length str a + b + 1 a + b + 1 a b 1 {
            flag = false;
        } flag = false flag false if (str.charAt(a) != '-') {
            flag = false;
        } str.charAt(a) != '-' str.charAt(a) str.charAt str a '-' {
            flag = false;
        } flag = false flag false int count = 0; count 0 for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            if (str.charAt(i) == '-') {
                count++;
            }
        } {
            if (str.charAt(i) == '-') {
                count++;
            }
        } if (str.charAt(i) == '-') {
                count++;
            } str.charAt(i) == '-' str.charAt(i) str.charAt str i '-' {
                count++;
            } count++ count if (count != 1) {
            flag = false;
        } count != 1 count 1 {
            flag = false;
        } flag = false flag false System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        boolean flag = true;
        if (str.length() != a + b + 1) {
            flag = false;
        }
        if (str.charAt(a) != '-') {
            flag = false;
        }
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '-') {
                count++;
            }
        }
        if (count != 1) {
            flag = false;
        }
        System.out.println(flag ? "Yes" : "No");
    }
}