include <bits/stdc++.h>

using namespace std;

int main() {
    int a, b;
    string s;
    cin >> a >> b >> s;

    vector<int> vt;
    for (int i = 0; i < s.length(); ++i) {
        if (s[i] == '-') vt.emplace_back(i);
    }

    if (vt.size() == 1 and vt[0] == a) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}
