import 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 s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {

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

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("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 s = sc.next(); s sc.next() sc.next sc boolean isCorrect = true; isCorrect true if (s.charAt(a) != '-') isCorrect = false; s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' isCorrect = false isCorrect false for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        } int i = 0; int i = 0; i 0 i < a + b i a + b a b i++ i++ i {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        } {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        } if (!isCorrect) break; !isCorrect isCorrect break; if (i == a) continue; i == a i a continue; if (s.charAt(i) == '-') isCorrect = false; s.charAt(i) == '-' s.charAt(i) s.charAt s i '-' isCorrect = false isCorrect false if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } isCorrect {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "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 s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("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 s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import 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 s = sc.next();

        boolean isCorrect = true;
        if (s.charAt(a) != '-') isCorrect = false;

        for (int i = 0; i < a + b; i++) {
            if (!isCorrect) break;
            if (i == a) continue;
            if (s.charAt(i) == '-') isCorrect = false;
        }

        if (isCorrect) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
