#include<bits/stdc++.h>

using namespace std;
using ll = long long;


int main()
{
    int a, b;
    string s;
    cin >> a >> b >> s;
    bool res = s[a] == '-';
    cout << (res && count(s.begin(), s.end(), '-') == 1 ? "Yes" : "No") << endl;    
}