#include <iostream>
#include <string>
using namespace std;

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

    int a_cnt=0, b_cnt, bar_cnt=0;
    int length = s.size()
    for(int i=0; i<length; i++){
        if(s.at(i) == '-'){
            bar_cnt++;
            continue;
        }
        if(bar_cnt < 1) a_cnt++;
        else b_cnt++;
    }
    if(bar_cnt != 1){
        cout << "No\n";
    }
    else if(a_cnt == a && b_cnt == b){
        cout << "Yes\n";
    }
    else{
        cout << "No\n"
    }
}