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

int main()
{
    int a, b;
    string s;
    int f = 0, cnt = 0;
    cin >> a >> b >> s;
   if(s.size() != a+b+1) {cout << "Yes" << endl; return 0;}
   for(int i = 0; i < s.size(); i++)
   {
       if(s[i] == '-') cnt++;
       if(!(s[i]>='0'and s[i]<= '9' and s[i]=='-'))
        { f = 1; break; }
   }
   if(f) {cout << "No" << endl; return 0;}
    if (s[a] != '-') {cout << "No" << endl; return 0;}
    if(cnt > 1) {cout << "No" << endl; return 0;}
    cout << "Yes" << endl;
    return 0;
}
