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

int main()
{
int A, B;
cin >> A >> B;
string s;
cin >> s;
vector<int> p;
for(int i = 0;i < A + B + 1;i++) {
if(s[i] == '-') p.push_back(i);
}
cout << ((int)p.size() == 1 && p[0] == A ? "Yes" : "No") << endl;
}