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

int main() {
    int A, B;
    cin >> A >> B;
    string s;
    cin >> s;
    if (count(s.begin(), s.end(), '-') != 1 || s[A] != '-') {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }
}