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

int main() {
    int a,b,n;
    string s;
    cin>>a>>b>>s;
    n=count(s.begin(),s.end(),'-');
    if(s[a]=='-'&&n==1)  cout<<"Yes\n";
    else  cout<<"No\n";
    return 0;
}