#include <bits/stdc++.h>
#include <cctype>
#include <algorithm>


bool ish(std::string c) {
    return c == "-";
}

bool is_all(std::string a, std::string b, std::string c) {
    if (std::all_of(a.cbegin(), a.cend(), isdigit)) {
        if(std::all_of(b.cbegin(),b.cend(),ish)){
            if (std::all_of(c.cbegin(),c.cend(),isdigit))
                return true;
        }
    }
}

int main() {
    using std::string;
    using std::cin;
    using std::cout;
    using std::endl;
    int a, b;
    string s;
    cin >> a >> b;
    cin >> s;
    std::string sub0 = s.substr(0, a);
    std::string sub1 = s.substr(a + 1, 1);
    std::string sub2 = s.substr(a + 2, b);
    if (is_all(sub0,sub1,sub2)){
        cout << "Yes" << endl;
    } else{
        cout << "No" << endl;
    }
}

