#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main() {
    string A, B, S;
    cin >> A >> B >> S;
    string regex_str = "[0-9]{" + A + "}-[0-9]{" + B + "}";
    cout << (regex_match(S, regex(regex_str.c_str())) ? "Yes" : "No") << endl;
}
