#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <stdio.h>
#include <set>
#include <vector>
using namespace std;


int main(){
    int a, b;
    string s;
    cin>>a>>b>>s;
    int i=1;
    int ans = 0;
    for(auto v:s){
        if(i<=a || (a+2<=i && i<=a+b+1)){
            i++;
            if(v<'0' || v>'9'){
                ans++;
            }
        }
        if(i==a+1){
            i++
            if(v!='-'){
                ans++;
            }
        }
        else{
            ans++;
            break;
        }
    }
    if(ans>0){
        cout<<"No"<<endl;
    }
    else{
        cout<<"Yes"<<endl;
    }
    return 0;
}