#include <bits/stdc++.h>
using namespace std;
int a, b;
string s;
int main() {
  cin >> a >> b;
  cin >> s;
  if (s[a + 1] != '-') {
    cout << "No";
    exit(0);
  } else {
    for (int j = 1; j <= s.size(); j++)
      if (s[j] == '-' && j != a + 1) {
        cout << "No";
        exit(0);
      }
  }
  cout << "Yes";
  return 0;
}
