#include <iostream>
#include <string>
#include <cctype>
#include <algorithm>

using namespace std;

int main(void) {
    string s;
    int A, B;
    cin >> A >> B >> s;

    string chA, chB;

    if (!(s.size() == A + B + 1)) {
        cout << "No" << endl;
        return 0;
    }

    if (!(1 <= A <= 5) || !(1 <= B <= 5)) {
        cout << "No" << endl;
        return 0;
    }

    if (s[A] != '-') {
        cout << "No" << endl;
        return 0;
    }

    chA = s.substr(0, A);
    chB = s.substr(A + 1, B);

    if (!all_of(chA.cbegin(), chA.cend(), isdigit)) {
        cout << "No" << endl;
        return 0;
    }

    if (!all_of(chB.cbegin(), chB.cend(), isdigit)) {
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
    return 0;
}