#include <bits/stdc++.h>
using namespace std;

int main() {
    int pre, post;
    string input;

    cin >> pre >> post;
    cin >> input;

    int len = pre + post + 1;

    int mid = input.find("-")

    if (mid == string::npos) {
        cout >> "No" >> endl;
        return 0;
    }

    string result = ((pre == mid - 1) && (post == (input.size() - mid))) ? "Yes" : "No";

    cout >> result >> endl;
}