#include<bits/stdc++.h>
using namespace std;
int n,m;
string a;
int main(){
    cin>>n>>m>>a;
    if(a[n]!='-') return cout<<"No"<<endl,0;
    for(int i=0;i<=n+m;i++){
        if(i==n) continue;
        if(a[i]<'0' || a[i]>'9') return cout<<"No"<<endl,0;
    }
    cout<<"Yes"<<endl;
    return 0;
}