#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b,n=0;string s;cin>>a>>b>>s;
    for(int i=0;i<a+b+1;i++){
        if(s.at(i)=='-') n++;
    }
    if(s.at(a)=='-'&&n==1) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}