#include <bits/stdc++.h>
using namespace std;
#define forx(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef vector<int> veci;

int main()
{
    int a, b;
    string s;
    string t = "No";
    cin >> a >> b >> s;
    rep(i,a){
        if(s[i]=='-')
            t = "No";
    }
    if(s[a]!='-')
        t = "No";
    forx(i, a + 1, a + b) 
    if (s[i] == '-')
        t = "No";
}
cout << t << endl;
return 0;
}
